Package elki.clustering.em.models
Interface EMClusterModel<O,M extends Model>
-
- Type Parameters:
O- Input object typeM- Cluster model type
- All Known Subinterfaces:
BetulaClusterModel
- All Known Implementing Classes:
DiagonalGaussianModel,MultivariateGaussianModel,SphericalGaussianModel,TextbookMultivariateGaussianModel,TextbookSphericalGaussianModel,TwoPassMultivariateGaussianModel
public interface EMClusterModel<O,M extends Model>Models usable in EM clustering.- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidbeginEStep()Begin the E step.doubleestimateLogDensity(O vec)Estimate the log likelihood of a vector.MfinalizeCluster()Finalize a cluster model.voidfinalizeEStep(double weight, double prior)Finalize the E step.default voidfinalizeFirstPassE()Finalize the first pass of the E step.default voidfirstPassE(O vec, double weight)First run in the E step.doublegetWeight()Get the cluster weight.default booleanneedsTwoPass()True, if the model needs two passes in the E step.voidsetWeight(double weight)Set the cluster weight.voidupdateE(O vec, double weight)Process one data point in the E step
-
-
-
Method Detail
-
beginEStep
void beginEStep()
Begin the E step.
-
needsTwoPass
default boolean needsTwoPass()
True, if the model needs two passes in the E step.- Returns:
truewhen an initial pass is needed.
-
firstPassE
default void firstPassE(O vec, double weight)
First run in the E step.By default, this is not used (c.f.
needsTwoPass().- Parameters:
vec- Vector to processweight- Weight of point ("responsibility" of the cluster)
-
finalizeFirstPassE
default void finalizeFirstPassE()
Finalize the first pass of the E step.By default, this is not used (c.f.
needsTwoPass().
-
updateE
void updateE(O vec, double weight)
Process one data point in the E step- Parameters:
vec- Vector to processweight- Weight of point ("responsibility" of the cluster)
-
finalizeEStep
void finalizeEStep(double weight, double prior)Finalize the E step.- Parameters:
weight- weight of the clusterprior- MAP prior (0 for MLE)
-
estimateLogDensity
double estimateLogDensity(O vec)
Estimate the log likelihood of a vector.- Parameters:
vec- Vector- Returns:
- log likelihood.
-
finalizeCluster
M finalizeCluster()
Finalize a cluster model.- Returns:
- Cluster model
-
getWeight
double getWeight()
Get the cluster weight.- Returns:
- Cluster weight
-
setWeight
void setWeight(double weight)
Set the cluster weight.- Parameters:
weight- Cluster weight
-
-