public class SphericalGaussianModel extends java.lang.Object implements EMClusterModel<EMModel>
| Modifier and Type | Field and Description | 
|---|---|
(package private) double | 
logNorm
Normalization factor. 
 | 
(package private) double | 
logNormDet
Normalization factor. 
 | 
(package private) double[] | 
mean
Mean vector. 
 | 
(package private) double[] | 
nmea
Temporary storage, to avoid reallocations. 
 | 
(package private) double | 
priorvar
Prior variance, for MAP estimation. 
 | 
(package private) double | 
variance
Variances. 
 | 
(package private) double | 
weight
Weight aggregation sum. 
 | 
(package private) double | 
wsum
Weight aggregation sum. 
 | 
| Constructor and Description | 
|---|
SphericalGaussianModel(double weight,
                      double[] mean)
Constructor. 
 | 
SphericalGaussianModel(double weight,
                      double[] mean,
                      double var)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
beginEStep()
Begin the E step. 
 | 
double | 
estimateLogDensity(NumberVector vec)
Estimate the log likelihood of a vector. 
 | 
EMModel | 
finalizeCluster()
Finalize a cluster model. 
 | 
void | 
finalizeEStep(double weight,
             double prior)
Finalize the E step. 
 | 
double | 
getWeight()
Get the cluster weight. 
 | 
double | 
mahalanobisDistance(double[] vec)
Compute the Mahalanobis distance from the centroid for a given vector. 
 | 
double | 
mahalanobisDistance(NumberVector vec)
Compute the Mahalanobis distance from the centroid for a given vector. 
 | 
void | 
setWeight(double weight)
Set the cluster weight. 
 | 
void | 
updateE(NumberVector vec,
       double wei)
Process one data point in the E step 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfinalizeFirstPassE, firstPassE, needsTwoPassdouble[] mean
double variance
double[] nmea
double logNorm
double logNormDet
double weight
double wsum
double priorvar
public SphericalGaussianModel(double weight,
                              double[] mean)
weight - Cluster weightmean - Initial meanpublic SphericalGaussianModel(double weight,
                              double[] mean,
                              double var)
weight - Cluster weightmean - Initial meanvar - Initial variancepublic void beginEStep()
EMClusterModelbeginEStep in interface EMClusterModel<EMModel>public void updateE(NumberVector vec, double wei)
EMClusterModelupdateE in interface EMClusterModel<EMModel>vec - Vector to processwei - Weight of point ("responsibility" of the cluster)public void finalizeEStep(double weight,
                          double prior)
EMClusterModelfinalizeEStep in interface EMClusterModel<EMModel>weight - weight of the clusterprior - MAP prior (0 for MLE)public double mahalanobisDistance(double[] vec)
vec - Vectorpublic double mahalanobisDistance(NumberVector vec)
vec - Vectorpublic double estimateLogDensity(NumberVector vec)
EMClusterModelestimateLogDensity in interface EMClusterModel<EMModel>vec - Vectorpublic double getWeight()
EMClusterModelgetWeight in interface EMClusterModel<EMModel>public void setWeight(double weight)
EMClusterModelsetWeight in interface EMClusterModel<EMModel>weight - Cluster weightpublic EMModel finalizeCluster()
EMClusterModelfinalizeCluster in interface EMClusterModel<EMModel>Copyright © 2019 ELKI Development Team. License information.