|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstatistics.Density
statistics.DensityFull
public final class DensityFull
The DensityFull is a Gaussian density with full covariance matrix. The computation is sped up using Cholesky decomposition. This is also numerically stable. K = L L^T => K^-1 = L^T^-1 L^-1 z = x - mue z^T K^-1 z = || L^-1 x ||^2 = || y ||^2 y = L^-1 x => x = L y; solve using forward substitution
Field Summary | |
---|---|
static double |
GAMMA
regularization constant |
double[] |
L
cov = L L^T where L is a lower triangular, packed matrix; Cholesky decomposition! |
Fields inherited from class statistics.Density |
---|
apr, ascore, cov, fd, id, lh, MIN_PROB, mue, REGULARIZER, score |
Constructor Summary | |
---|---|
DensityFull(DensityFull copy)
|
|
DensityFull(double apr,
double[] mue,
double[] cov)
Create a new Density with diagonal covariance |
|
DensityFull(int dim)
|
Method Summary | |
---|---|
Density |
clone()
Create a deep copy of this instance. |
double |
evaluate(double[] x)
Evaluate the density for the given sample vector x. |
java.lang.String |
toString()
Obtain a string representation of the density. |
void |
update()
Update the internal variables. |
Methods inherited from class statistics.Density |
---|
clear, covarianceAsGnuplot, fill, superVector |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final transient double GAMMA
public double[] L
Constructor Detail |
---|
public DensityFull(DensityFull copy)
public DensityFull(double apr, double[] mue, double[] cov)
apr
- prior probabilitymue
- mean vectorcov
- covariance vectorpublic DensityFull(int dim)
Method Detail |
---|
public Density clone()
clone
in class Density
public double evaluate(double[] x)
evaluate
in class Density
x
- feature vector
public java.lang.String toString()
toString
in class java.lang.Object
public void update()
update
in class Density
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |