public class GaussianDistribution extends Object implements ProbabilityDensityFunction, LogProbabilityDensityFunction, SamplingDistribution<Jama.Matrix>, FirstOrderMoment<Jama.Matrix>, SecondOrderCentralMoment<Jama.Matrix>, Copyable<GaussianDistribution>
| Modifier and Type | Field and Description |
|---|---|
protected Jama.Matrix |
cov
covariance matrix
|
protected Jama.Matrix |
icov
inverse covariance matrix
|
protected Jama.Matrix |
L |
protected double |
logfactor
log of the normalization factor
|
protected Jama.Matrix |
mean
mean vector
|
protected double |
normfactor
normalization factor
|
protected Random |
rand
random generator for sampling
|
| Modifier | Constructor and Description |
|---|---|
protected |
GaussianDistribution(int DOF)
Constructor for a Gaussian distribution of dimension DOF
with the zero vector as mean, the unity matrix as covariance matrix
and a new random generator for sampling
|
|
GaussianDistribution(int DOF,
Random rand)
Constructor for a Gaussian distribution of dimension DOF
with the zero vector as mean, the unity matrix as covariance matrix
and a given random generator for sampling
|
|
GaussianDistribution(Jama.Matrix mean,
Jama.Matrix covariance)
Gaussian distribution with given mean, covariance and a new random generator for sampling
|
|
GaussianDistribution(Jama.Matrix mean,
Jama.Matrix covariance,
Random rand)
Gaussian distribution with given mean, covariance and random generator for sampling
|
| Modifier and Type | Method and Description |
|---|---|
GaussianDistribution |
copy() |
Jama.Matrix |
drawSample()
Generate a new sample from this density.
|
Jama.Matrix |
getCovariance()
Returns the covariance matrix
|
Jama.Matrix |
getInverseCovariance() |
Jama.Matrix |
getMean()
Returns the mean vector.
|
double |
log_p(Jama.Matrix x)
Evaluate natural logarithm of p(X) at location x. log(P(X=x))
|
double |
mahalanobis(Jama.Matrix x) |
double |
p(Jama.Matrix x)
Evaluate p(X) at location x.
|
void |
setCovariance(Jama.Matrix covariance) |
void |
setMean(Jama.Matrix mean) |
protected Jama.Matrix mean
protected Jama.Matrix cov
protected Jama.Matrix icov
protected Random rand
protected double normfactor
protected double logfactor
protected Jama.Matrix L
protected GaussianDistribution(int DOF)
DOF - public GaussianDistribution(int DOF,
Random rand)
DOF - rand - public GaussianDistribution(Jama.Matrix mean,
Jama.Matrix covariance)
throws IllegalArgumentException
mean - covariance - IllegalArgumentExceptionpublic GaussianDistribution(Jama.Matrix mean,
Jama.Matrix covariance,
Random rand)
throws IllegalArgumentException
mean - covariance - rand - IllegalArgumentExceptionpublic Jama.Matrix getMean()
getMean in interface FirstOrderMoment<Jama.Matrix>public void setMean(Jama.Matrix mean)
throws IllegalArgumentException
IllegalArgumentExceptionpublic Jama.Matrix getCovariance()
getCovariance in interface SecondOrderCentralMoment<Jama.Matrix>public Jama.Matrix getInverseCovariance()
public void setCovariance(Jama.Matrix covariance)
throws IllegalArgumentException
IllegalArgumentExceptionpublic double log_p(Jama.Matrix x)
LogEvaluatableDistributionlog_p in interface LogEvaluatableDistribution<Jama.Matrix>x - realization of random variable Xpublic double p(Jama.Matrix x)
EvaluatableDistributionp in interface EvaluatableDistribution<Jama.Matrix>x - realization of random variable Xpublic Jama.Matrix drawSample()
SamplingDistributiondrawSample in interface SamplingDistribution<Jama.Matrix>public double mahalanobis(Jama.Matrix x)
public GaussianDistribution copy()
copy in interface Copyable<GaussianDistribution>Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.