@PublicationReference(author="Christopher M. Bishop",title="Pattern Recognition and Machine Learning",type=Book,year=2006,pages={104,105}) @PublicationReference(author="Wikipedia",title="Multivariate Student distribution",type=WebPage,year=2010,url="http://en.wikipedia.org/wiki/Multivariate_Student_distribution") public class MultivariateStudentTDistribution extends AbstractDistribution<Vector> implements ClosedFormComputableDistribution<Vector>
Modifier and Type | Class and Description |
---|---|
static class |
MultivariateStudentTDistribution.PDF
PDF of the MultivariateStudentTDistribution
|
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_DEGREES_OF_FREEDOM
Default degrees of freedom, 3.0.
|
static int |
DEFAULT_DIMENSIONALITY
Default dimensionality, 2.
|
protected double |
degreesOfFreedom
Degrees of freedom in the distribution, usually the number of
datapoints - 1, DOFs must be greater than zero.
|
protected Vector |
mean
Mean, or noncentrality parameter, of the distribution
|
Constructor and Description |
---|
MultivariateStudentTDistribution()
Creates a new instance of MultivariateStudentTDistribution
|
MultivariateStudentTDistribution(double degreesOfFreedom,
Vector mean,
Matrix precision)
Creates a distribution with the given dimensionality.
|
MultivariateStudentTDistribution(int dimensionality)
Creates a distribution with the given dimensionality.
|
MultivariateStudentTDistribution(MultivariateStudentTDistribution other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
MultivariateStudentTDistribution |
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.
|
Matrix |
getCovariance()
Computes the covariance of the distribution, which involves inverting
the precision matrix.
|
double |
getDegreesOfFreedom()
Getter for degreesOfFreedom
|
int |
getInputDimensionality()
Gets the dimensionality of the distribution.
|
Vector |
getMean()
Gets the arithmetic mean, or "first central moment" or "expectation",
of the distribution.
|
Matrix |
getPrecision()
Getter for precision
|
MultivariateStudentTDistribution.PDF |
getProbabilityFunction()
Gets the distribution function associated with this Distribution,
either the PDF or PMF.
|
void |
sampleInto(java.util.Random random,
int sampleCount,
java.util.Collection<? super Vector> output)
Draws multiple random samples from the distribution and puts the result
into the given collection.
|
void |
setDegreesOfFreedom(double degreesOfFreedom)
Setter for degreesOfFreedom
|
void |
setMean(Vector mean)
Setter for mean
|
void |
setPrecision(Matrix precision)
Setter for precision
|
sample, sample
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
sample, sample
public static final int DEFAULT_DIMENSIONALITY
public static final double DEFAULT_DEGREES_OF_FREEDOM
protected double degreesOfFreedom
protected Vector mean
public MultivariateStudentTDistribution()
public MultivariateStudentTDistribution(int dimensionality)
dimensionality
- Dimensionality of the distribution.public MultivariateStudentTDistribution(double degreesOfFreedom, Vector mean, Matrix precision)
degreesOfFreedom
- Degrees of freedom in the distribution, usually the number of
datapoints - 1, DOFs must be greater than zero.mean
- Mean, or noncentrality parameter, of the distributionprecision
- Precision, which is proportionate to the inverse of variance, of the
distribution, must be symmetric and positive definite.public MultivariateStudentTDistribution(MultivariateStudentTDistribution other)
other
- MultivariateStudentTDistribution to copypublic MultivariateStudentTDistribution 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 double getDegreesOfFreedom()
public void setDegreesOfFreedom(double degreesOfFreedom)
degreesOfFreedom
- Degrees of freedom in the distribution, usually the number of
datapoints - 1, DOFs must be greater than zero.public Vector getMean()
DistributionWithMean
getMean
in interface DistributionWithMean<Vector>
public void setMean(Vector mean)
mean
- Mean, or noncentrality parameter, of the distributionpublic Matrix getPrecision()
public void setPrecision(Matrix precision)
precision
- Precision, which is proportionate to the inverse of variance, of the
distribution, must be symmetric and positive definite.public Matrix getCovariance()
public void sampleInto(java.util.Random random, int sampleCount, java.util.Collection<? super Vector> output)
Distribution
sampleInto
in interface Distribution<Vector>
random
- Random number generator to use.sampleCount
- The number of samples to draw. Cannot be negative.output
- The collection to add the samples into.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 MultivariateStudentTDistribution.PDF getProbabilityFunction()
ComputableDistribution
getProbabilityFunction
in interface ComputableDistribution<Vector>