public class SphericalGaussianModel extends Object implements EMClusterModel<EMModel>
Modifier and Type | Field and Description |
---|---|
private static Logging |
LOG
Class logger.
|
(package private) Vector |
mean
Mean vector.
|
(package private) double[] |
mref
Temporary storage, to avoid reallocations.
|
(package private) double[] |
nmea
Temporary storage, to avoid reallocations.
|
(package private) double |
norm
Normalization factor.
|
(package private) double |
normDistrFactor
Normalization factor.
|
(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,
Vector mean)
Constructor.
|
SphericalGaussianModel(double weight,
Vector mean,
double norm)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
beginEStep()
Begin the E step.
|
double |
estimateDensity(NumberVector vec)
Estimate the likelihood of a vector.
|
EMModel |
finalizeCluster()
Finalize a cluster model.
|
void |
finalizeEStep()
Finalize the E step.
|
double |
getWeight()
Get the cluster weight.
|
double |
mahalanobisDistance(NumberVector vec)
Compute the Mahalanobis distance from the centroid for a given vector.
|
double |
mahalanobisDistance(Vector 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)
Update the
|
private static Logging LOG
Vector mean
double variance
double[] nmea
double[] mref
double norm
double normDistrFactor
double weight
double wsum
public SphericalGaussianModel(double weight, Vector mean)
weight
- Cluster weightmean
- Initial meanpublic SphericalGaussianModel(double weight, Vector mean, double norm)
weight
- Cluster weightmean
- Initial meannorm
- Normalization factor.public void beginEStep()
EMClusterModel
beginEStep
in interface EMClusterModel<EMModel>
public void updateE(NumberVector vec, double wei)
EMClusterModel
updateE
in interface EMClusterModel<EMModel>
vec
- Vector to processwei
- Weightpublic void finalizeEStep()
EMClusterModel
finalizeEStep
in interface EMClusterModel<EMModel>
public double mahalanobisDistance(Vector vec)
vec
- Vectorpublic double mahalanobisDistance(NumberVector vec)
vec
- Vectorpublic double estimateDensity(NumberVector vec)
EMClusterModel
estimateDensity
in interface EMClusterModel<EMModel>
vec
- Vectorpublic double getWeight()
EMClusterModel
getWeight
in interface EMClusterModel<EMModel>
public void setWeight(double weight)
EMClusterModel
setWeight
in interface EMClusterModel<EMModel>
weight
- Cluster weightpublic EMModel finalizeCluster()
EMClusterModel
finalizeCluster
in interface EMClusterModel<EMModel>
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.