As the name indicates, the Quantity Score is based on the number of contributions by a user. Depending on the role of the user this has a slightly different meaning.
Contributors/Reviewers: number of reviewed contributions they were involved in
Clients: number of contributions they provided feedback for
Elapsed time as a metric
As we'll continuously want to keep track of a user's quantity score while users are contributing, the elapsed time between contributions is used as a metric. This elapsed time is the exact same metric as the number of contributions, but the lower its average value, the higher the quantity score should be.
For the initial contribution, the maximum elapsed time Tmax is used to make sure a new user has to build up his reputation. Additionally, when the elapsed time exceeds Tmax, a timeout occurs and the counting starts from 0 again.
Because the elapsed time between 2 contributions can vary significantly, we take the exponential moving average (EMA) of this value for new elapsedTime (Ti) values. The formula is given below where the value p determines the amount of history to take into account in the EMA.
Before this value can be used as a reputation score we want it to be bound between 0 and 1. To achieve this we use the following formula:
This approach allows the quantity score to be updated in real-time on each contribution of a user.