Class: Saulabs::TrueSkill::Layers::TeamPerformanceDifferences
- Defined in:
- lib/saulabs/trueskill/layers/team_performance_differences.rb
Instance Attribute Summary
Attributes inherited from Base
#factors, #graph, #input, #output
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(graph) ⇒ TeamPerformanceDifferences
constructor
A new instance of TeamPerformanceDifferences.
Methods inherited from Base
#posterior_schedule, #prior_schedule
Constructor Details
#initialize(graph) ⇒ TeamPerformanceDifferences
Returns a new instance of TeamPerformanceDifferences.
10 11 12 |
# File 'lib/saulabs/trueskill/layers/team_performance_differences.rb', line 10 def initialize(graph) super(graph) end |
Instance Method Details
#build ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/saulabs/trueskill/layers/team_performance_differences.rb', line 14 def build (0..@input.size-2).each do |i| variable = Gauss::Distribution.new @factors << Factors::WeightedSum.new(variable, [@input[i][0], @input[i+1][0]], [1.0, -1.0]) @output << [variable] end end |