trueskill 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
data/lib/saulabs/trueskill.rb
CHANGED
@@ -30,4 +30,28 @@ describe Saulabs::TrueSkill::FactorGraph do
|
|
30
30
|
|
31
31
|
end
|
32
32
|
|
33
|
+
end
|
34
|
+
|
35
|
+
describe Saulabs::TrueSkill::FactorGraph do
|
36
|
+
|
37
|
+
before :each do
|
38
|
+
@teams = [
|
39
|
+
[
|
40
|
+
TrueSkill::Rating.new(8.3, 3.1, 0.8, 0.02),
|
41
|
+
TrueSkill::Rating.new(3.0, 3.1, 0.8, 0.02),
|
42
|
+
TrueSkill::Rating.new(2.2, 3.2, 0.8, 0.02)
|
43
|
+
],
|
44
|
+
[
|
45
|
+
TrueSkill::Rating.new(25.0, 8.3333, 0.8, 0.02)
|
46
|
+
]
|
47
|
+
]
|
48
|
+
@skill = @teams.last.first
|
49
|
+
@graph = TrueSkill::FactorGraph.new(@teams, [1,2], :beta => 25.0, :draw_probability => 0.0)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should do something" do
|
53
|
+
40.times { TrueSkill::FactorGraph.new(@teams, [1,2], :beta => 15.0, :draw_probability => 0.0).update_skills }
|
54
|
+
puts "#{@skill.to_s}"
|
55
|
+
end
|
56
|
+
|
33
57
|
end
|