Gaussian Variables

Representation of a Gaussian variable for the use in CLG models.

class pyagrum.clg.GaussianVariable(name, mu, sigma)

A continuous Gaussian variable: a name, a mean (the intercept when the variable has parents in a CLG) and a standard deviation.

The standard deviation must be positive for a variable of a pyagrum.clg.CLG; 0 is only accepted by the constructor, for the posterior of an observed variable (a point mass) built by the inference.

Raises:

ValueError – if sigma is negative.

Parameters:
  • name (str)

  • mu (float)

  • sigma (float)

Methods

mu()

Returns the mean of the variable, or the intercept of its equation when the variable has parents in a CLG.

name()

Returns the name of the variable.

setMu()

Set the mean of the variable, or the intercept of its equation when the variable has parents in a CLG.

setSigma()

Set the standard deviation of the variable.

sigma()

Returns the standard deviation of the variable.