|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.sandia.cognition.util.AbstractCloneableSerializable
gov.sandia.cognition.statistics.AbstractDistribution<Matrix>
gov.sandia.cognition.statistics.distribution.NormalInverseWishartDistribution
@PublicationReference(author="Stanley Sawyer", title="Wishart Distributions and Inverse-Wishart Sampling", type=Misc, year=2007, url="http://www.math.wustl.edu/~sawyer/hmhandouts/Wishart.pdf") public class NormalInverseWishartDistribution
The normal inverse Wishart distribution
Nested Class Summary | |
---|---|
static class |
NormalInverseWishartDistribution.PDF
PDF of the normal inverse-Wishart distribution. |
Field Summary | |
---|---|
protected double |
covarianceDivisor
Term that divides the covariance sampled from the inverseWishart, must be greater than zero. |
static double |
DEFAULT_COVARIANCE_DIVISOR
Default covariance divisor, 1.0. |
static int |
DEFAULT_DIMENSIONALITY
Default dimensionality of the precision matrix, 2. |
protected MultivariateGaussian |
gaussian
Generates the mean, given the covariance from the inverseWishart. |
protected InverseWishartDistribution |
inverseWishart
Generates the covariance for the Gaussian. |
Constructor Summary | |
---|---|
NormalInverseWishartDistribution()
Default constructor |
|
NormalInverseWishartDistribution(int dimensionality)
Creates a new instance of NormalInverseWishartDistribution |
|
NormalInverseWishartDistribution(int dimensionality,
double covarianceDivisor)
Creates a new instance of NormalInverseWishartDistribution |
|
NormalInverseWishartDistribution(MultivariateGaussian gaussian,
InverseWishartDistribution inverseWishart,
double covarianceDivisor)
Creates a new instance of NormalInverseWishartDistribution |
|
NormalInverseWishartDistribution(NormalInverseWishartDistribution other)
Copy constructor |
Method Summary | |
---|---|
NormalInverseWishartDistribution |
clone()
This makes public the clone method on the Object class and
removes the exception that it throws. |
void |
convertFromVector(Vector parameters)
Converts the object from a Vector of parameters. |
Vector |
convertToVector()
Converts the object to a vector. |
double |
getCovarianceDivisor()
Getter for covarianceDivisor |
MultivariateGaussian |
getGaussian()
Getter for gaussian. |
int |
getInputDimensionality()
Gets the input dimensionality of the Gaussian and the inverse-Wishart distributions |
InverseWishartDistribution |
getInverseWishart()
Getter for inverseWishart |
Matrix |
getMean()
Gets the arithmetic mean, or "first central moment" or "expectation", of the distribution. |
NormalInverseWishartDistribution.PDF |
getProbabilityFunction()
Gets the distribution function associated with this Distribution, either the PDF or PMF. |
ArrayList<Matrix> |
sample(Random random,
int numSamples)
Draws multiple random samples from the distribution. |
void |
setCovarianceDivisor(double covarianceDivisor)
Setter for covarianceDivisor |
void |
setGaussian(MultivariateGaussian gaussian)
Setter for gaussian |
void |
setInverseWishart(InverseWishartDistribution inverseWishart)
Setter for inverseWishart |
Methods inherited from class gov.sandia.cognition.statistics.AbstractDistribution |
---|
sample |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gov.sandia.cognition.statistics.Distribution |
---|
sample |
Field Detail |
---|
public static final int DEFAULT_DIMENSIONALITY
public static final double DEFAULT_COVARIANCE_DIVISOR
protected double covarianceDivisor
protected MultivariateGaussian gaussian
protected InverseWishartDistribution inverseWishart
Constructor Detail |
---|
public NormalInverseWishartDistribution()
public NormalInverseWishartDistribution(int dimensionality)
dimensionality
- Dimensionality of the distributionspublic NormalInverseWishartDistribution(int dimensionality, double covarianceDivisor)
dimensionality
- Dimensionality of the distributionscovarianceDivisor
- Term that divides the covariance sampled from the inverseWishart,
must be greater than zero.public NormalInverseWishartDistribution(MultivariateGaussian gaussian, InverseWishartDistribution inverseWishart, double covarianceDivisor)
gaussian
- Generates the mean, given the covariance from the inverseWishart.inverseWishart
- Generates the covariance for the Gaussian.covarianceDivisor
- Term that divides the covariance sampled from the inverseWishart,
must be greater than zero.public NormalInverseWishartDistribution(NormalInverseWishartDistribution other)
other
- NormalInverseWishartDistribution to copyMethod Detail |
---|
public NormalInverseWishartDistribution clone()
AbstractCloneableSerializable
Object
class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone()
to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil
may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone()
as the basis for your implementation.
clone
in interface Vectorizable
clone
in interface CloneableSerializable
clone
in class AbstractCloneableSerializable
public MultivariateGaussian getGaussian()
public void setGaussian(MultivariateGaussian gaussian)
gaussian
- Generates the mean, given the covariance from the inverseWishart.public InverseWishartDistribution getInverseWishart()
public void setInverseWishart(InverseWishartDistribution inverseWishart)
inverseWishart
- Generates the covariance for the Gaussian.public double getCovarianceDivisor()
public void setCovarianceDivisor(double covarianceDivisor)
covarianceDivisor
- Term that divides the covariance sampled from the inverseWishart,
must be greater than zero.public Matrix getMean()
DistributionWithMean
getMean
in interface DistributionWithMean<Matrix>
public ArrayList<Matrix> sample(Random random, int numSamples)
Distribution
sample
in interface Distribution<Matrix>
random
- Random-number generator to use in order to generate random numbers.numSamples
- Number of samples to draw from the distribution.
public Vector convertToVector()
Vectorizable
convertToVector
in interface Vectorizable
public void convertFromVector(Vector parameters)
Vectorizable
convertFromVector
in interface Vectorizable
parameters
- The parameters to incorporate.public int getInputDimensionality()
public NormalInverseWishartDistribution.PDF getProbabilityFunction()
ComputableDistribution
getProbabilityFunction
in interface ComputableDistribution<Matrix>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |