Gaussian-class: Gaussian Class with args (mu, sigma) or (pi, tau)

Description Usage: Arguments: Methods: See Also Examples

Description

Reference Class to create objects that represent normal distributions, which is how players' skills are represented. Gaussian takes arguments (mu, sigma) or (pi, tau), which default to (0, Inf) or (0, 0), respectively. Note: for consistency reasons and not having to update two sets of values, the class only stores pi and tau. Therefore, g1$mu <- 25 and g1$sigma <- 8 does not work as expected, though g1$pi <- 0.04 and g1$tau <- 0.13 does.

Usage:

Gaussian(mu, sigma)

Gaussian(pi, tau)

Arguments:

mu

is the mean skill

μ

sigma

is the std dev of skill

σ

pi

is the precision

( 1 / σ^2)

tau

is the precision adjusted mean

(μ / σ^2)

Methods:

*

signature(e1 = Gaussian, e2 = Gaussian):...

/

signature(e1 = Gaussian, e2 = Gaussian):...

MuSigma():

returns a list of c(mu, sigma)

mu():

returns mu

sigma():

returns sigma

See Also

Divide and Multiply These functions are not methods as a new copy of the Gaussian is produced (see example below).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
	 
  g0 <- Gaussian(pi = 0.05, tau = 0.13)	
	
  g1 <- Gaussian(mu = 25, sigma = 8)
  g2 <- Gaussian(30, 6)
  g3 <- Multiply(g1, g2)

  # these are equivalent
  Gaussian$new(25, 8)
  Gaussian$new(mu = 25, pi = 8)
  Gaussian(mu = 25, pi = 8) 
  Gaussian(25, 8) 
  
  # approximately the same
  Gaussian(pi = 0.016, tau = 0.391) 

trueskill documentation built on May 2, 2019, 5:15 a.m.