MomentsComponentEstimator#

class MomentsComponentEstimator[исходный код]#

Базовые классы: ComponentEstimator

Estimates the free parameters of a component by the method of moments, without optimization.

The moments are weighted by a column of the partition matrix: 1.0 for the points of the cluster and 0.0 for the others. The estimator supports Normal in the meanStd parametrization, Exponential in the rate parametrization and ContinuousUniform in the standard parametrization. Parameters fixed through family.view(...) are taken into account and are not returned. The data are not checked: degenerate values are rejected by the calling code.

For Normal and Exponential the result coincides with MLEComponentEstimator. For ContinuousUniform the interval is centered at the mean of the cluster and its half-width is \(\sqrt{3}\) times its standard deviation, instead of the minimum and maximum used by MLEComponentEstimator: the method of moments is less sensitive to outliers, but the interval may not cover the whole cluster.

Methods

supports(family)

Whether a method-of-moments formula is registered for the family and its parametrization.

estimate(X, h, family)

Estimate the free parameters of a component of the family by its method-of-moments formula.

Примеры

Pass the estimator to ClusterInitializer explicitly:

ClusterInitializer(partitioner, component_estimator=MomentsComponentEstimator())