MomentsComponentEstimator#
- class MomentsComponentEstimator[исходный код]#
Базовые классы:
ComponentEstimatorEstimates 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
Normalin themeanStdparametrization,Exponentialin therateparametrization andContinuousUniformin thestandardparametrization. Parameters fixed throughfamily.view(...)are taken into account and are not returned. The data are not checked: degenerate values are rejected by the calling code.For
NormalandExponentialthe result coincides withMLEComponentEstimator. ForContinuousUniformthe 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 byMLEComponentEstimator: 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
ClusterInitializerexplicitly:ClusterInitializer(partitioner, component_estimator=MomentsComponentEstimator())