doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
get_indices(i) [source] Row and column indices of the i’th bicluster. Only works if rows_ and columns_ attributes exist. Parameters iint The index of the cluster. Returns row_indndarray, dtype=np.intp Indices of rows in the dataset that belong to the bicluster. col_indndarray, dtype=np.intp Indices ...
sklearn.modules.generated.sklearn.cluster.spectralcoclustering#sklearn.cluster.SpectralCoclustering.get_indices
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.cluster.spectralcoclustering#sklearn.cluster.SpectralCoclustering.get_params
get_shape(i) [source] Shape of the i’th bicluster. Parameters iint The index of the cluster. Returns n_rowsint Number of rows in the bicluster. n_colsint Number of columns in the bicluster.
sklearn.modules.generated.sklearn.cluster.spectralcoclustering#sklearn.cluster.SpectralCoclustering.get_shape
get_submatrix(i, data) [source] Return the submatrix corresponding to bicluster i. Parameters iint The index of the cluster. dataarray-like of shape (n_samples, n_features) The data. Returns submatrixndarray of shape (n_rows, n_cols) The submatrix corresponding to bicluster i. Notes Works with s...
sklearn.modules.generated.sklearn.cluster.spectralcoclustering#sklearn.cluster.SpectralCoclustering.get_submatrix
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.cluster.spectralcoclustering#sklearn.cluster.SpectralCoclustering.set_params
sklearn.cluster.spectral_clustering(affinity, *, n_clusters=8, n_components=None, eigen_solver=None, random_state=None, n_init=10, eigen_tol=0.0, assign_labels='kmeans', verbose=False) [source] Apply clustering to a projection of the normalized Laplacian. In practice Spectral Clustering is very useful when the struct...
sklearn.modules.generated.sklearn.cluster.spectral_clustering#sklearn.cluster.spectral_clustering
sklearn.cluster.ward_tree(X, *, connectivity=None, n_clusters=None, return_distance=False) [source] Ward clustering based on a Feature matrix. Recursively merges the pair of clusters that minimally increases within-cluster variance. The inertia matrix uses a Heapq-based representation. This is the structured version,...
sklearn.modules.generated.sklearn.cluster.ward_tree#sklearn.cluster.ward_tree
class sklearn.compose.ColumnTransformer(transformers, *, remainder='drop', sparse_threshold=0.3, n_jobs=None, transformer_weights=None, verbose=False) [source] Applies transformers to columns of an array or pandas DataFrame. This estimator allows different columns or column subsets of the input to be transformed sepa...
sklearn.modules.generated.sklearn.compose.columntransformer#sklearn.compose.ColumnTransformer
sklearn.compose.ColumnTransformer class sklearn.compose.ColumnTransformer(transformers, *, remainder='drop', sparse_threshold=0.3, n_jobs=None, transformer_weights=None, verbose=False) [source] Applies transformers to columns of an array or pandas DataFrame. This estimator allows different columns or column subsets...
sklearn.modules.generated.sklearn.compose.columntransformer
fit(X, y=None) [source] Fit all transformers using X. Parameters X{array-like, dataframe} of shape (n_samples, n_features) Input data, of which specified subsets are used to fit the transformers. yarray-like of shape (n_samples,…), default=None Targets for supervised learning. Returns selfColumnTransf...
sklearn.modules.generated.sklearn.compose.columntransformer#sklearn.compose.ColumnTransformer.fit
fit_transform(X, y=None) [source] Fit all transformers, transform the data and concatenate results. Parameters X{array-like, dataframe} of shape (n_samples, n_features) Input data, of which specified subsets are used to fit the transformers. yarray-like of shape (n_samples,), default=None Targets for superv...
sklearn.modules.generated.sklearn.compose.columntransformer#sklearn.compose.ColumnTransformer.fit_transform
get_feature_names() [source] Get feature names from all transformers. Returns feature_nameslist of strings Names of the features produced by transform.
sklearn.modules.generated.sklearn.compose.columntransformer#sklearn.compose.ColumnTransformer.get_feature_names
get_params(deep=True) [source] Get parameters for this estimator. Returns the parameters given in the constructor as well as the estimators contained within the transformers of the ColumnTransformer. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobject...
sklearn.modules.generated.sklearn.compose.columntransformer#sklearn.compose.ColumnTransformer.get_params
property named_transformers_ Access the fitted transformer by name. Read-only attribute to access any transformer by given name. Keys are transformer names and values are the fitted transformer objects.
sklearn.modules.generated.sklearn.compose.columntransformer#sklearn.compose.ColumnTransformer.named_transformers_
set_params(**kwargs) [source] Set the parameters of this estimator. Valid parameter keys can be listed with get_params(). Note that you can directly set the parameters of the estimators contained in transformers of ColumnTransformer. Returns self
sklearn.modules.generated.sklearn.compose.columntransformer#sklearn.compose.ColumnTransformer.set_params
transform(X) [source] Transform X separately by each transformer, concatenate results. Parameters X{array-like, dataframe} of shape (n_samples, n_features) The data to be transformed by subset. Returns X_t{array-like, sparse matrix} of shape (n_samples, sum_n_components) hstack of results of transformer...
sklearn.modules.generated.sklearn.compose.columntransformer#sklearn.compose.ColumnTransformer.transform
sklearn.compose.make_column_selector(pattern=None, *, dtype_include=None, dtype_exclude=None) [source] Create a callable to select columns to be used with ColumnTransformer. make_column_selector can select columns based on datatype or the columns name with a regex. When using multiple selection criteria, all criteria...
sklearn.modules.generated.sklearn.compose.make_column_selector#sklearn.compose.make_column_selector
sklearn.compose.make_column_transformer(*transformers, remainder='drop', sparse_threshold=0.3, n_jobs=None, verbose=False) [source] Construct a ColumnTransformer from the given transformers. This is a shorthand for the ColumnTransformer constructor; it does not require, and does not permit, naming the transformers. I...
sklearn.modules.generated.sklearn.compose.make_column_transformer#sklearn.compose.make_column_transformer
class sklearn.compose.TransformedTargetRegressor(regressor=None, *, transformer=None, func=None, inverse_func=None, check_inverse=True) [source] Meta-estimator to regress on a transformed target. Useful for applying a non-linear transformation to the target y in regression problems. This transformation can be given a...
sklearn.modules.generated.sklearn.compose.transformedtargetregressor#sklearn.compose.TransformedTargetRegressor
sklearn.compose.TransformedTargetRegressor class sklearn.compose.TransformedTargetRegressor(regressor=None, *, transformer=None, func=None, inverse_func=None, check_inverse=True) [source] Meta-estimator to regress on a transformed target. Useful for applying a non-linear transformation to the target y in regression...
sklearn.modules.generated.sklearn.compose.transformedtargetregressor
fit(X, y, **fit_params) [source] Fit the model according to the given training data. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vector, where n_samples is the number of samples and n_features is the number of features. yarray-like of shape (n_samples,) Target values. ...
sklearn.modules.generated.sklearn.compose.transformedtargetregressor#sklearn.compose.TransformedTargetRegressor.fit
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.compose.transformedtargetregressor#sklearn.compose.TransformedTargetRegressor.get_params
predict(X) [source] Predict using the base regressor, applying inverse. The regressor is used to predict and the inverse_func or inverse_transform is applied before returning the prediction. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Samples. Returns y_hatndarray of shape (n_...
sklearn.modules.generated.sklearn.compose.transformedtargetregressor#sklearn.compose.TransformedTargetRegressor.predict
score(X, y, sample_weight=None) [source] Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred) ** 2).sum() and \(v\) is the total sum of squares ((y_true - y_true.mean()) ** 2).sum()...
sklearn.modules.generated.sklearn.compose.transformedtargetregressor#sklearn.compose.TransformedTargetRegressor.score
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.compose.transformedtargetregressor#sklearn.compose.TransformedTargetRegressor.set_params
sklearn.config_context(**new_config) [source] Context manager for global scikit-learn configuration Parameters assume_finitebool, default=False If True, validation for finiteness will be skipped, saving time, but leading to potential crashes. If False, validation for finiteness will be performed, avoiding error...
sklearn.modules.generated.sklearn.config_context#sklearn.config_context
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_precisionbool, default=True Specify if...
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope
sklearn.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_pr...
sklearn.modules.generated.sklearn.covariance.ellipticenvelope
correct_covariance(data) [source] Apply a correction to raw Minimum Covariance Determinant estimates. Correction using the empirical correction factor suggested by Rousseeuw and Van Driessen in [RVD]. Parameters dataarray-like of shape (n_samples, n_features) The data matrix, with p features and n samples. The ...
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope.correct_covariance
decision_function(X) [source] Compute the decision function of the given observations. Parameters Xarray-like of shape (n_samples, n_features) The data matrix. Returns decisionndarray of shape (n_samples,) Decision function of the samples. It is equal to the shifted Mahalanobis distances. The threshold ...
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope.decision_function
error_norm(comp_cov, norm='frobenius', scaling=True, squared=True) [source] Computes the Mean Squared Error between two covariance estimators. (In the sense of the Frobenius norm). Parameters comp_covarray-like of shape (n_features, n_features) The covariance to compare with. norm{“frobenius”, “spectral”}, de...
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope.error_norm
fit(X, y=None) [source] Fit the EllipticEnvelope model. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training data. yIgnored Not used, present for API consistency by convention.
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope.fit
fit_predict(X, y=None) [source] Perform fit on X and returns labels for X. Returns -1 for outliers and 1 for inliers. Parameters X{array-like, sparse matrix, dataframe} of shape (n_samples, n_features) yIgnored Not used, present for API consistency by convention. Returns yndarray of shape (n_samples,) ...
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope.fit_predict
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope.get_params
get_precision() [source] Getter for the precision matrix. Returns precision_array-like of shape (n_features, n_features) The precision matrix associated to the current covariance object.
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope.get_precision
mahalanobis(X) [source] Computes the squared Mahalanobis distances of given observations. Parameters Xarray-like of shape (n_samples, n_features) The observations, the Mahalanobis distances of the which we compute. Observations are assumed to be drawn from the same distribution than the data used in fit. Ret...
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope.mahalanobis
predict(X) [source] Predict the labels (1 inlier, -1 outlier) of X according to the fitted model. Parameters Xarray-like of shape (n_samples, n_features) The data matrix. Returns is_inlierndarray of shape (n_samples,) Returns -1 for anomalies/outliers and +1 for inliers.
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope.predict
reweight_covariance(data) [source] Re-weight raw Minimum Covariance Determinant estimates. Re-weight observations using Rousseeuw’s method (equivalent to deleting outlying observations from the data set before computing location and covariance estimates) described in [RVDriessen]. Parameters dataarray-like of sha...
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope.reweight_covariance
score(X, y, sample_weight=None) [source] Returns the mean accuracy on the given test data and labels. In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted. Parameters Xarray-like of shape (n_samples, n_featu...
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope.score
score_samples(X) [source] Compute the negative Mahalanobis distances. Parameters Xarray-like of shape (n_samples, n_features) The data matrix. Returns negative_mahal_distancesarray-like of shape (n_samples,) Opposite of the Mahalanobis distances.
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope.score_samples
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.covariance.ellipticenvelope#sklearn.covariance.EllipticEnvelope.set_params
class sklearn.covariance.EmpiricalCovariance(*, store_precision=True, assume_centered=False) [source] Maximum likelihood covariance estimator Read more in the User Guide. Parameters store_precisionbool, default=True Specifies if the estimated precision is stored. assume_centeredbool, default=False If True, ...
sklearn.modules.generated.sklearn.covariance.empiricalcovariance#sklearn.covariance.EmpiricalCovariance
sklearn.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_precisionbool, default=True Specifies if the estimated precision is stored. assum...
sklearn.modules.generated.sklearn.covariance.empiricalcovariance
error_norm(comp_cov, norm='frobenius', scaling=True, squared=True) [source] Computes the Mean Squared Error between two covariance estimators. (In the sense of the Frobenius norm). Parameters comp_covarray-like of shape (n_features, n_features) The covariance to compare with. norm{“frobenius”, “spectral”}, de...
sklearn.modules.generated.sklearn.covariance.empiricalcovariance#sklearn.covariance.EmpiricalCovariance.error_norm
fit(X, y=None) [source] Fits the Maximum Likelihood Estimator covariance model according to the given training data and parameters. Parameters Xarray-like of shape (n_samples, n_features) Training data, where n_samples is the number of samples and n_features is the number of features. yIgnored Not used, pre...
sklearn.modules.generated.sklearn.covariance.empiricalcovariance#sklearn.covariance.EmpiricalCovariance.fit
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.covariance.empiricalcovariance#sklearn.covariance.EmpiricalCovariance.get_params
get_precision() [source] Getter for the precision matrix. Returns precision_array-like of shape (n_features, n_features) The precision matrix associated to the current covariance object.
sklearn.modules.generated.sklearn.covariance.empiricalcovariance#sklearn.covariance.EmpiricalCovariance.get_precision
mahalanobis(X) [source] Computes the squared Mahalanobis distances of given observations. Parameters Xarray-like of shape (n_samples, n_features) The observations, the Mahalanobis distances of the which we compute. Observations are assumed to be drawn from the same distribution than the data used in fit. Ret...
sklearn.modules.generated.sklearn.covariance.empiricalcovariance#sklearn.covariance.EmpiricalCovariance.mahalanobis
score(X_test, y=None) [source] Computes the log-likelihood of a Gaussian data set with self.covariance_ as an estimator of its covariance matrix. Parameters X_testarray-like of shape (n_samples, n_features) Test data of which we compute the likelihood, where n_samples is the number of samples and n_features is ...
sklearn.modules.generated.sklearn.covariance.empiricalcovariance#sklearn.covariance.EmpiricalCovariance.score
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.covariance.empiricalcovariance#sklearn.covariance.EmpiricalCovariance.set_params
sklearn.covariance.empirical_covariance(X, *, assume_centered=False) [source] Computes the Maximum likelihood covariance estimator Parameters Xndarray of shape (n_samples, n_features) Data from which to compute the covariance estimate assume_centeredbool, default=False If True, data will not be centered bef...
sklearn.modules.generated.sklearn.covariance.empirical_covariance#sklearn.covariance.empirical_covariance
class sklearn.covariance.GraphicalLasso(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. Changed in version v0.20: GraphLasso has been renamed to Graphi...
sklearn.modules.generated.sklearn.covariance.graphicallasso#sklearn.covariance.GraphicalLasso
sklearn.covariance.GraphicalLasso class sklearn.covariance.GraphicalLasso(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. Changed in version v0.20: G...
sklearn.modules.generated.sklearn.covariance.graphicallasso
error_norm(comp_cov, norm='frobenius', scaling=True, squared=True) [source] Computes the Mean Squared Error between two covariance estimators. (In the sense of the Frobenius norm). Parameters comp_covarray-like of shape (n_features, n_features) The covariance to compare with. norm{“frobenius”, “spectral”}, de...
sklearn.modules.generated.sklearn.covariance.graphicallasso#sklearn.covariance.GraphicalLasso.error_norm
fit(X, y=None) [source] Fits the GraphicalLasso model to X. Parameters Xarray-like of shape (n_samples, n_features) Data from which to compute the covariance estimate yIgnored Not used, present for API consistency by convention. Returns selfobject
sklearn.modules.generated.sklearn.covariance.graphicallasso#sklearn.covariance.GraphicalLasso.fit
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.covariance.graphicallasso#sklearn.covariance.GraphicalLasso.get_params
get_precision() [source] Getter for the precision matrix. Returns precision_array-like of shape (n_features, n_features) The precision matrix associated to the current covariance object.
sklearn.modules.generated.sklearn.covariance.graphicallasso#sklearn.covariance.GraphicalLasso.get_precision
mahalanobis(X) [source] Computes the squared Mahalanobis distances of given observations. Parameters Xarray-like of shape (n_samples, n_features) The observations, the Mahalanobis distances of the which we compute. Observations are assumed to be drawn from the same distribution than the data used in fit. Ret...
sklearn.modules.generated.sklearn.covariance.graphicallasso#sklearn.covariance.GraphicalLasso.mahalanobis
score(X_test, y=None) [source] Computes the log-likelihood of a Gaussian data set with self.covariance_ as an estimator of its covariance matrix. Parameters X_testarray-like of shape (n_samples, n_features) Test data of which we compute the likelihood, where n_samples is the number of samples and n_features is ...
sklearn.modules.generated.sklearn.covariance.graphicallasso#sklearn.covariance.GraphicalLasso.score
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.covariance.graphicallasso#sklearn.covariance.GraphicalLasso.set_params
class sklearn.covariance.GraphicalLassoCV(*, alphas=4, n_refinements=4, cv=None, tol=0.0001, enet_tol=0.0001, max_iter=100, mode='cd', n_jobs=None, verbose=False, assume_centered=False) [source] Sparse inverse covariance w/ cross-validated choice of the l1 penalty. See glossary entry for cross-validation estimator. R...
sklearn.modules.generated.sklearn.covariance.graphicallassocv#sklearn.covariance.GraphicalLassoCV
sklearn.covariance.GraphicalLassoCV class sklearn.covariance.GraphicalLassoCV(*, alphas=4, n_refinements=4, cv=None, tol=0.0001, enet_tol=0.0001, max_iter=100, mode='cd', n_jobs=None, verbose=False, assume_centered=False) [source] Sparse inverse covariance w/ cross-validated choice of the l1 penalty. See glossary e...
sklearn.modules.generated.sklearn.covariance.graphicallassocv
error_norm(comp_cov, norm='frobenius', scaling=True, squared=True) [source] Computes the Mean Squared Error between two covariance estimators. (In the sense of the Frobenius norm). Parameters comp_covarray-like of shape (n_features, n_features) The covariance to compare with. norm{“frobenius”, “spectral”}, de...
sklearn.modules.generated.sklearn.covariance.graphicallassocv#sklearn.covariance.GraphicalLassoCV.error_norm
fit(X, y=None) [source] Fits the GraphicalLasso covariance model to X. Parameters Xarray-like of shape (n_samples, n_features) Data from which to compute the covariance estimate yIgnored Not used, present for API consistency by convention. Returns selfobject
sklearn.modules.generated.sklearn.covariance.graphicallassocv#sklearn.covariance.GraphicalLassoCV.fit
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.covariance.graphicallassocv#sklearn.covariance.GraphicalLassoCV.get_params
get_precision() [source] Getter for the precision matrix. Returns precision_array-like of shape (n_features, n_features) The precision matrix associated to the current covariance object.
sklearn.modules.generated.sklearn.covariance.graphicallassocv#sklearn.covariance.GraphicalLassoCV.get_precision
mahalanobis(X) [source] Computes the squared Mahalanobis distances of given observations. Parameters Xarray-like of shape (n_samples, n_features) The observations, the Mahalanobis distances of the which we compute. Observations are assumed to be drawn from the same distribution than the data used in fit. Ret...
sklearn.modules.generated.sklearn.covariance.graphicallassocv#sklearn.covariance.GraphicalLassoCV.mahalanobis
score(X_test, y=None) [source] Computes the log-likelihood of a Gaussian data set with self.covariance_ as an estimator of its covariance matrix. Parameters X_testarray-like of shape (n_samples, n_features) Test data of which we compute the likelihood, where n_samples is the number of samples and n_features is ...
sklearn.modules.generated.sklearn.covariance.graphicallassocv#sklearn.covariance.GraphicalLassoCV.score
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.covariance.graphicallassocv#sklearn.covariance.GraphicalLassoCV.set_params
sklearn.covariance.graphical_lasso(emp_cov, alpha, *, cov_init=None, mode='cd', tol=0.0001, enet_tol=0.0001, max_iter=100, verbose=False, return_costs=False, eps=2.220446049250313e-16, return_n_iter=False) [source] l1-penalized covariance estimator Read more in the User Guide. Changed in version v0.20: graph_lasso h...
sklearn.modules.generated.sklearn.covariance.graphical_lasso#sklearn.covariance.graphical_lasso
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-Di...
sklearn.modules.generated.sklearn.covariance.ledoitwolf#sklearn.covariance.LedoitWolf
sklearn.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-Co...
sklearn.modules.generated.sklearn.covariance.ledoitwolf
error_norm(comp_cov, norm='frobenius', scaling=True, squared=True) [source] Computes the Mean Squared Error between two covariance estimators. (In the sense of the Frobenius norm). Parameters comp_covarray-like of shape (n_features, n_features) The covariance to compare with. norm{“frobenius”, “spectral”}, de...
sklearn.modules.generated.sklearn.covariance.ledoitwolf#sklearn.covariance.LedoitWolf.error_norm
fit(X, y=None) [source] Fit the Ledoit-Wolf shrunk covariance model according to the given training data and parameters. Parameters Xarray-like of shape (n_samples, n_features) Training data, where n_samples is the number of samples and n_features is the number of features. yIgnored Not used, present for AP...
sklearn.modules.generated.sklearn.covariance.ledoitwolf#sklearn.covariance.LedoitWolf.fit
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.covariance.ledoitwolf#sklearn.covariance.LedoitWolf.get_params
get_precision() [source] Getter for the precision matrix. Returns precision_array-like of shape (n_features, n_features) The precision matrix associated to the current covariance object.
sklearn.modules.generated.sklearn.covariance.ledoitwolf#sklearn.covariance.LedoitWolf.get_precision
mahalanobis(X) [source] Computes the squared Mahalanobis distances of given observations. Parameters Xarray-like of shape (n_samples, n_features) The observations, the Mahalanobis distances of the which we compute. Observations are assumed to be drawn from the same distribution than the data used in fit. Ret...
sklearn.modules.generated.sklearn.covariance.ledoitwolf#sklearn.covariance.LedoitWolf.mahalanobis
score(X_test, y=None) [source] Computes the log-likelihood of a Gaussian data set with self.covariance_ as an estimator of its covariance matrix. Parameters X_testarray-like of shape (n_samples, n_features) Test data of which we compute the likelihood, where n_samples is the number of samples and n_features is ...
sklearn.modules.generated.sklearn.covariance.ledoitwolf#sklearn.covariance.LedoitWolf.score
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.covariance.ledoitwolf#sklearn.covariance.LedoitWolf.set_params
sklearn.covariance.ledoit_wolf(X, *, assume_centered=False, block_size=1000) [source] Estimates the shrunk Ledoit-Wolf covariance matrix. Read more in the User Guide. Parameters Xarray-like of shape (n_samples, n_features) Data from which to compute the covariance estimate assume_centeredbool, default=False ...
sklearn.modules.generated.sklearn.covariance.ledoit_wolf#sklearn.covariance.ledoit_wolf
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 s...
sklearn.modules.generated.sklearn.covariance.mincovdet#sklearn.covariance.MinCovDet
sklearn.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 Gaussia...
sklearn.modules.generated.sklearn.covariance.mincovdet
correct_covariance(data) [source] Apply a correction to raw Minimum Covariance Determinant estimates. Correction using the empirical correction factor suggested by Rousseeuw and Van Driessen in [RVD]. Parameters dataarray-like of shape (n_samples, n_features) The data matrix, with p features and n samples. The ...
sklearn.modules.generated.sklearn.covariance.mincovdet#sklearn.covariance.MinCovDet.correct_covariance
error_norm(comp_cov, norm='frobenius', scaling=True, squared=True) [source] Computes the Mean Squared Error between two covariance estimators. (In the sense of the Frobenius norm). Parameters comp_covarray-like of shape (n_features, n_features) The covariance to compare with. norm{“frobenius”, “spectral”}, de...
sklearn.modules.generated.sklearn.covariance.mincovdet#sklearn.covariance.MinCovDet.error_norm
fit(X, y=None) [source] Fits a Minimum Covariance Determinant with the FastMCD algorithm. Parameters Xarray-like of shape (n_samples, n_features) Training data, where n_samples is the number of samples and n_features is the number of features. y: Ignored Not used, present for API consistency by convention. ...
sklearn.modules.generated.sklearn.covariance.mincovdet#sklearn.covariance.MinCovDet.fit
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.covariance.mincovdet#sklearn.covariance.MinCovDet.get_params
get_precision() [source] Getter for the precision matrix. Returns precision_array-like of shape (n_features, n_features) The precision matrix associated to the current covariance object.
sklearn.modules.generated.sklearn.covariance.mincovdet#sklearn.covariance.MinCovDet.get_precision
mahalanobis(X) [source] Computes the squared Mahalanobis distances of given observations. Parameters Xarray-like of shape (n_samples, n_features) The observations, the Mahalanobis distances of the which we compute. Observations are assumed to be drawn from the same distribution than the data used in fit. Ret...
sklearn.modules.generated.sklearn.covariance.mincovdet#sklearn.covariance.MinCovDet.mahalanobis
reweight_covariance(data) [source] Re-weight raw Minimum Covariance Determinant estimates. Re-weight observations using Rousseeuw’s method (equivalent to deleting outlying observations from the data set before computing location and covariance estimates) described in [RVDriessen]. Parameters dataarray-like of sha...
sklearn.modules.generated.sklearn.covariance.mincovdet#sklearn.covariance.MinCovDet.reweight_covariance
score(X_test, y=None) [source] Computes the log-likelihood of a Gaussian data set with self.covariance_ as an estimator of its covariance matrix. Parameters X_testarray-like of shape (n_samples, n_features) Test data of which we compute the likelihood, where n_samples is the number of samples and n_features is ...
sklearn.modules.generated.sklearn.covariance.mincovdet#sklearn.covariance.MinCovDet.score
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.covariance.mincovdet#sklearn.covariance.MinCovDet.set_params
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...
sklearn.modules.generated.sklearn.covariance.oas#sklearn.covariance.OAS
sklearn.covariance.oas(X, *, assume_centered=False) [source] Estimate covariance with the Oracle Approximating Shrinkage algorithm. Parameters Xarray-like of shape (n_samples, n_features) Data from which to compute the covariance estimate. assume_centeredbool, default=False If True, data will not be centere...
sklearn.modules.generated.oas-function#sklearn.covariance.oas
sklearn.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...
sklearn.modules.generated.sklearn.covariance.oas
error_norm(comp_cov, norm='frobenius', scaling=True, squared=True) [source] Computes the Mean Squared Error between two covariance estimators. (In the sense of the Frobenius norm). Parameters comp_covarray-like of shape (n_features, n_features) The covariance to compare with. norm{“frobenius”, “spectral”}, de...
sklearn.modules.generated.sklearn.covariance.oas#sklearn.covariance.OAS.error_norm
fit(X, y=None) [source] Fit the Oracle Approximating Shrinkage covariance model according to the given training data and parameters. Parameters Xarray-like of shape (n_samples, n_features) Training data, where n_samples is the number of samples and n_features is the number of features. yIgnored Not used, pr...
sklearn.modules.generated.sklearn.covariance.oas#sklearn.covariance.OAS.fit
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.covariance.oas#sklearn.covariance.OAS.get_params
get_precision() [source] Getter for the precision matrix. Returns precision_array-like of shape (n_features, n_features) The precision matrix associated to the current covariance object.
sklearn.modules.generated.sklearn.covariance.oas#sklearn.covariance.OAS.get_precision
mahalanobis(X) [source] Computes the squared Mahalanobis distances of given observations. Parameters Xarray-like of shape (n_samples, n_features) The observations, the Mahalanobis distances of the which we compute. Observations are assumed to be drawn from the same distribution than the data used in fit. Ret...
sklearn.modules.generated.sklearn.covariance.oas#sklearn.covariance.OAS.mahalanobis
score(X_test, y=None) [source] Computes the log-likelihood of a Gaussian data set with self.covariance_ as an estimator of its covariance matrix. Parameters X_testarray-like of shape (n_samples, n_features) Test data of which we compute the likelihood, where n_samples is the number of samples and n_features is ...
sklearn.modules.generated.sklearn.covariance.oas#sklearn.covariance.OAS.score