covariance.OAS()

class sklearn.covariance.OAS(store_precision=True, assume_centered=False) [source] Oracle Approximating Shrinkage Estimator Read more in the User Guide. OAS is a particular form of shrinkage described in ?Shrinkage Algorithms for MMSE Covariance Estimation? Chen et al., IEEE Trans. on Sign. Proc., Volume 58, Issue 10, October 2010. The formula used here does not correspond to the one given in the article. It has been taken from the Matlab program available from the authors? webpage (http://

covariance.MinCovDet()

class sklearn.covariance.MinCovDet(store_precision=True, assume_centered=False, support_fraction=None, random_state=None) [source] Minimum Covariance Determinant (MCD): robust estimator of covariance. The Minimum Covariance Determinant covariance estimator is to be applied on Gaussian-distributed data, but could still be relevant on data drawn from a unimodal, symmetric distribution. It is not meant to be used with multi-modal data (the algorithm used to fit a MinCovDet object is likely to

covariance.LedoitWolf()

class sklearn.covariance.LedoitWolf(store_precision=True, assume_centered=False, block_size=1000) [source] LedoitWolf Estimator Ledoit-Wolf is a particular form of shrinkage, where the shrinkage coefficient is computed using O. Ledoit and M. Wolf?s formula as described in ?A Well-Conditioned Estimator for Large-Dimensional Covariance Matrices?, Ledoit and Wolf, Journal of Multivariate Analysis, Volume 88, Issue 2, February 2004, pages 365-411. Read more in the User Guide. Parameters: store

covariance.GraphLassoCV()

class sklearn.covariance.GraphLassoCV(alphas=4, n_refinements=4, cv=None, tol=0.0001, enet_tol=0.0001, max_iter=100, mode='cd', n_jobs=1, verbose=False, assume_centered=False) [source] Sparse inverse covariance w/ cross-validated choice of the l1 penalty Read more in the User Guide. Parameters: alphas : integer, or list positive float, optional If an integer is given, it fixes the number of points on the grids of alpha to be used. If a list is given, it gives the grid to be used. See the

covariance.GraphLasso()

class sklearn.covariance.GraphLasso(alpha=0.01, mode='cd', tol=0.0001, enet_tol=0.0001, max_iter=100, verbose=False, assume_centered=False) [source] Sparse inverse covariance estimation with an l1-penalized estimator. Read more in the User Guide. Parameters: alpha : positive float, default 0.01 The regularization parameter: the higher alpha, the more regularization, the sparser the inverse covariance. mode : {?cd?, ?lars?}, default ?cd? The Lasso solver to use: coordinate descent or LAR

covariance.EmpiricalCovariance()

class sklearn.covariance.EmpiricalCovariance(store_precision=True, assume_centered=False) [source] Maximum likelihood covariance estimator Read more in the User Guide. Parameters: store_precision : bool Specifies if the estimated precision is stored. assume_centered : bool If True, data are not centered before computation. Useful when working with data whose mean is almost, but not exactly zero. If False (default), data are centered before computation. Attributes: covariance_ : 2D nd

covariance.EllipticEnvelope()

class sklearn.covariance.EllipticEnvelope(store_precision=True, assume_centered=False, support_fraction=None, contamination=0.1, random_state=None) [source] An object for detecting outliers in a Gaussian distributed dataset. Read more in the User Guide. Parameters: store_precision : bool Specify if the estimated precision is stored. assume_centered : Boolean If True, the support of robust location and covariance estimates is computed, and a covariance estimate is recomputed from it, wit

Confusion matrix

Example of confusion matrix usage to evaluate the quality of the output of a classifier on the iris data set. The diagonal elements represent the number of points for which the predicted label is equal to the true label, while off-diagonal elements are those that are mislabeled by the classifier. The higher the diagonal values of the confusion matrix the better, indicating many correct predictions. The figures show the confusion matrix with and without normalization by class support size (numb

Concentration Prior Type Analysis of Variation Bayesian Gaussian Mixture

This example plots the ellipsoids obtained from a toy dataset (mixture of three Gaussians) fitted by the BayesianGaussianMixture class models with a Dirichlet distribution prior (weight_concentration_prior_type='dirichlet_distribution') and a Dirichlet process prior (weight_concentration_prior_type='dirichlet_process'). On each figure, we plot the results for three different values of the weight concentration prior. The BayesianGaussianMixture class can adapt its number of mixture componentsau

Concatenating multiple feature extraction methods

In many real-world examples, there are many ways to extract features from a dataset. Often it is beneficial to combine several methods to obtain good performance. This example shows how to use FeatureUnion to combine features obtained by PCA and univariate selection. Combining features using this transformer has the benefit that it allows cross validation and grid searches over the whole process. The combination used in this example is not particularly helpful on this dataset and is only used