Package samer.models
Class GaussianStats
- java.lang.Object
-
- samer.tools.NullTask
-
- samer.models.GaussianStats
-
- Direct Known Subclasses:
- GaussianStatsOnline
public class GaussianStats extends NullTask
Collect statistics about a vector: accumulates sums and sums of products, then computes mean and covariance. This is NOT a model! Computing energies and probabilities directly from the first and second moments is horrible, since you need the inverse of the covariance matrix. You could, however, use this to train a Gaussian model.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description GaussianStats(VVector vec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
dispose()
void
getCorrelation(Matrix R)
void
getCovariance(Matrix C)
void
getMean(double[] mu)
void
getMean(VVector mu)
void
reset()
void
run()
void
starting()
void
stopping()
-
-
-
Constructor Detail
-
GaussianStats
public GaussianStats(VVector vec) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
Method Detail
-
dispose
public void dispose()
-
getMean
public void getMean(VVector mu)
-
getMean
public void getMean(double[] mu)
-
getCovariance
public void getCovariance(Matrix C)
-
getCorrelation
public void getCorrelation(Matrix R)
-
reset
public void reset()
-
starting
public void starting()
-
stopping
public void stopping()
-
-