Game {TrueSkillThroughTime} | R Documentation |
Game class
Game(teams, result = vector(), p_draw = P_DRAW)
posteriors(g)
## S4 method for signature 'Game'
posteriors(g)
teams |
A list of |
result |
A vector of numbers, with the score obtained by each team, or
an empty vector. The default value is an empty vector. In this case, the
outcome is defined by the order in which the |
p_draw |
A number, the probability of a draw. The default value is
|
g |
A game object |
Game object
a1 = Player(Gaussian(mu=0, sigma=6), beta=1, gamma=0.03)
a2 = Player(); a3 = Player(); a4 = Player()
team_a = c(a1, a2)
team_b = c(a3, a4)
teams = list(team_a, team_b)
g = Game(teams)
post = posteriors(g)
lhs = g@likelihoods
post[[1]][[1]] == lhs[[1]][[1]]*a1@prior
ev = g@evidence
ev == 0.5
ta = c(a1)
tb = c(a2, a3)
tc = c(a4)
teams_3 = list(ta, tb, tc)
result = c(1, 0, 0)
g3 = Game(teams_3, result, p_draw=0.25)