blog.distrib
Class LinearGaussian

java.lang.Object
  extended by blog.AbstractCondProbDistrib
      extended by blog.distrib.LinearGaussian
All Implemented Interfaces:
CondProbDistrib

public class LinearGaussian
extends AbstractCondProbDistrib

Multivariate Gaussian distribution whose mean is an affine function of some vector-valued parents. Specifically, the distribution is Normal(mu + W v, Sigma). Here v is a column vector formed by stacking all the parent vectors on top of each other; we'll call its dimension c. Then mu is a 1xd mean vector, W is a dxc regression matrix, and Sigma is a dxd covariance matrix. Note that the covariance of this distribution does not depend on the parents.

In an input file, this CPD takes three parameters: mu, W, Sigma.


Constructor Summary
LinearGaussian(java.util.List params)
          Takes a parameter list whose first element is a 1xd mean matrix, second element is a dxc regression matrix (where c is the sum of the dimensions of the parent vectors), and third element is a dxd covariance matrix.
 
Method Summary
 double getProb(java.util.List args, java.lang.Object value)
          For a discrete distribution, returns the conditional probability of childValue given the argument values args.
 java.lang.Object sampleVal(java.util.List args, Type childType)
          Samples a value according to this CPD given the args .
 
Methods inherited from class blog.AbstractCondProbDistrib
getLogProb, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinearGaussian

public LinearGaussian(java.util.List params)
Takes a parameter list whose first element is a 1xd mean matrix, second element is a dxc regression matrix (where c is the sum of the dimensions of the parent vectors), and third element is a dxd covariance matrix.

Method Detail

getProb

public double getProb(java.util.List args,
                      java.lang.Object value)
Description copied from interface: CondProbDistrib
For a discrete distribution, returns the conditional probability of childValue given the argument values args. For a continuous distribution, returns the conditional probability density at childValue.


sampleVal

public java.lang.Object sampleVal(java.util.List args,
                                  Type childType)
Description copied from interface: CondProbDistrib
Samples a value according to this CPD given the args . The object returned should be of the specified type.