statsmodels.robust.covariance.CovM.fit#

CovM.fit(start_mean=None, start_shape=None, start_scale=None, maxiter=100, update_scale=True)[source]#

Estimate mean, shape and scale parameters with MM-estimator

Parameters:
start_meanNone or ndarray

Starting value for mean, center. If None, then median is used.

start_shapeNone or 2-dim ndarray

Starting value of shape matrix, i.e., scatter matrix normalized to det(scatter) = 1. If None, then scaled covariance matrix of data is used.

start_scaleNone or float

Starting value of scale.

maxiterint

Maximum number of iterations.

update_scalebool

If update_scale is False, then the scale is fixed at start_scale and only mean and shape are updated in each iteration.

Returns:
CovMResult

Named tuple with mean, shape, scale, cov, converged, n_iter, and mahalanobis. See CovMResult for details.

Notes

If start_scale is provided and update_scale is False, then this is an M-estimator with a predetermined scale as used in the second stage of an MM-estimator.