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 void
beginEStep()
Begin the E step.double
estimateLogDensity(O vec)
Estimate the log likelihood of a vector.M
finalizeCluster()
Finalize a cluster model.void
finalizeEStep(double weight, double prior)
Finalize the E step.default void
finalizeFirstPassE()
Finalize the first pass of the E step.default void
firstPassE(O vec, double weight)
First run in the E step.double
getWeight()
Get the cluster weight.default boolean
needsTwoPass()
True, if the model needs two passes in the E step.void
setWeight(double weight)
Set the cluster weight.void
updateE(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:
true
when 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
-
-