|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFacemorph.psm.DiagonalGaussian
public class DiagonalGaussian
DiagonalGaussian model
| Constructor Summary | |
|---|---|
DiagonalGaussian(double[] mean,
double[] variance)
DisagonalGaussian constructor |
|
DiagonalGaussian(int dim)
DiagonalGaussian constructor |
|
| Method Summary | |
|---|---|
void |
build(java.util.Vector samples)
Build from a sample of double[] vectors |
double |
build(java.util.Vector samples,
java.util.Vector<java.lang.Double> sampleWeights)
Builds the mean and covariance matrix from the samples given |
double |
build(java.util.Vector samples,
java.util.Vector sampleWeights,
int index)
Builds the mean and covariance matrix from the samples given |
double[] |
getMean()
Get the mean vector |
double[] |
getRandomSample(java.util.Random rand)
Gets a random vector sampled from this Gaussian distribution |
double |
probability(double[] sample)
Calculates the probability of a sample vector |
void |
read(java.io.StreamTokenizer st)
Read from a StreamTokenizer |
void |
write(java.io.PrintStream ps)
Write to a PrintStream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DiagonalGaussian(int dim)
dim - the dimension of the space
public DiagonalGaussian(double[] mean,
double[] variance)
mean - the mean positionvariance - the variance along each axis| Method Detail |
|---|
public void build(java.util.Vector samples)
samples - the samples to build from
public double build(java.util.Vector samples,
java.util.Vector sampleWeights,
int index)
samples - the samples to build fromsampleWeights - the weights of the samplesindex - the index of each element in sampleqweights to use for the weighting
public double build(java.util.Vector samples,
java.util.Vector<java.lang.Double> sampleWeights)
samples - the samples to build fromsampleWeights - the weights of each sample
public double probability(double[] sample)
throws BigMatException
sample - the sdample to evaluate
BigMatExceptionpublic double[] getRandomSample(java.util.Random rand)
rand - a Random number generator
public double[] getMean()
public void write(java.io.PrintStream ps)
ps - the PrintStream to write to
public void read(java.io.StreamTokenizer st)
throws java.io.IOException
st - the StreamTokenizer to read from
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||