Function glicko2::new_rating [] [src]

pub fn new_rating(
    prior_rating: Glicko2Rating,
    results: &[GameResult],
    sys_constant: f64
) -> Glicko2Rating

Calculates a new rating from an existing rating and a series of results.

Unlike GameResults, which can be constructed with a Glicko2Rating or aGlickoRating, new_rating requires a Glicko2Rating. This is because the volatility field present only in Glicko2Rating affects the result of the calculation. Using a default volatility can be done, but must be made explicit at the call site using the Into<GlickoRating> impl. Similarly, converting the final result back to a GlickoRating and thus losing data is left to the caller. Generally, converting back to a GlickoRating is only needed for display purposes.

sys_constant is best explained in the words of Mark Glickman himself:

The system constant, τ, which constrains the change in volatility over time, needs to be set prior to application of the system. Reasonable choices are between 0.3 and 1.2, though the system should be tested to decide which value results in greatest predictive accuracy. Smaller values of τ prevent the volatility measures from changing by large amounts, which in turn prevent enormous changes in ratings based on very improbable results.