|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstatistics.Density
public abstract class Density
The abstract Density class provides the basic assets of a Gaussian density.
Field Summary | |
---|---|
double |
apr
prior probability |
double |
ascore
cached score from the last evaluate call, with prior! |
double[] |
cov
covariance matrix: either diagonal, or packed lower triangle |
int |
fd
feature dimension |
int |
id
Density ID |
double |
lh
log likelihood: log(apr*score) |
static double |
MIN_PROB
minimum density score |
double[] |
mue
mean vector |
static double |
REGULARIZER
regularizer for density score |
double |
score
cached score from the last evaluate call, no prior, no exponentiation (only good for ranking)! |
Constructor Summary | |
---|---|
Density(int dim)
Create a new density with a certain feature dimension |
Method Summary | |
---|---|
void |
clear()
Reset all the components. |
abstract Density |
clone()
Clone the instance (deep copy) |
java.lang.String |
covarianceAsGnuplot()
Generate the gnuplot command (parametric) for this density, accounting for the first 2 dimensions |
abstract double |
evaluate(double[] x)
Evaluate the density for the given sample vector x. |
void |
fill(double apr,
double[] mue,
double[] cov)
Set the parameters of the density. |
double[] |
superVector(boolean prior,
boolean mue,
boolean cov)
|
abstract void |
update()
Update the internally cached variables. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double apr
public transient double ascore
public double[] cov
public int fd
public int id
public transient double lh
public static final double MIN_PROB
public double[] mue
public static final double REGULARIZER
public transient double score
Constructor Detail |
---|
public Density(int dim)
dim
- Feature dimesionMethod Detail |
---|
public void clear()
public abstract Density clone()
clone
in class java.lang.Object
public java.lang.String covarianceAsGnuplot()
public abstract double evaluate(double[] x)
x
- feature vector
public void fill(double apr, double[] mue, double[] cov)
apr
- prior probabilitymue
- mean vectorcov
- covariance vectorpublic double[] superVector(boolean prior, boolean mue, boolean cov)
public abstract void update()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |