Class: Saulabs::TrueSkill::Rating
- Inherits:
-
Gauss::Distribution
- Object
- Gauss::Distribution
- Saulabs::TrueSkill::Rating
- Defined in:
- lib/saulabs/trueskill/rating.rb
Instance Attribute Summary collapse
-
#activity ⇒ Object
Returns the value of attribute activity.
-
#tau ⇒ Object
Returns the value of attribute tau.
-
#tau_squared ⇒ Object
readonly
Returns the value of attribute tau_squared.
Attributes inherited from Gauss::Distribution
#deviation, #mean, #precision, #precision_mean, #variance
Instance Method Summary collapse
-
#initialize(mean, deviation, activity = 1.0, tau = 25/300.0) ⇒ Rating
constructor
A new instance of Rating.
Methods inherited from Gauss::Distribution
#*, #+, #-, #/, #==, absolute_difference, cumulative_distribution_function, #equals, erf, inv_erf, log_product_normalization, log_ratio_normalization, probability_density_function, quantile_function, #replace, standard, #to_s, #value_at, with_deviation, with_precision, with_variance
Constructor Details
#initialize(mean, deviation, activity = 1.0, tau = 25/300.0) ⇒ Rating
Returns a new instance of Rating.
10 11 12 13 14 15 |
# File 'lib/saulabs/trueskill/rating.rb', line 10 def initialize(mean, deviation, activity = 1.0, tau = 25/300.0) super(mean, deviation) @activity = activity @tau = tau @tau_squared = @tau**2 end |
Instance Attribute Details
#activity ⇒ Object
Returns the value of attribute activity.
7 8 9 |
# File 'lib/saulabs/trueskill/rating.rb', line 7 def activity @activity end |
#tau ⇒ Object
Returns the value of attribute tau.
8 9 10 |
# File 'lib/saulabs/trueskill/rating.rb', line 8 def tau @tau end |
#tau_squared ⇒ Object (readonly)
Returns the value of attribute tau_squared.
8 9 10 |
# File 'lib/saulabs/trueskill/rating.rb', line 8 def tau_squared @tau_squared end |