This page

scikits.learn.covariance.shrunk_covariance

scikits.learn.covariance.shrunk_covariance(emp_cov, shrinkage=0.10000000000000001)

Calculates a covariance matrix shrunk on the diagonal

Returns :

shrunk_cov: array-like :

shrunk covariance

Notes

The regularized (shrunk) covariance is given by

(1 - shrinkage)*cov
  • shrinkage*mu*np.identity(n_features)

where mu = trace(cov) / n_features