doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
sklearn.feature_selection.SelectFromModel class sklearn.feature_selection.SelectFromModel(estimator, *, threshold=None, prefit=False, norm_order=1, max_features=None, importance_getter='auto') [source] Meta-transformer for selecting features based on importance weights. New in version 0.17. Read more in the User ...
sklearn.modules.generated.sklearn.feature_selection.selectfrommodel
fit(X, y=None, **fit_params) [source] Fit the SelectFromModel meta-transformer. Parameters Xarray-like of shape (n_samples, n_features) The training input samples. yarray-like of shape (n_samples,), default=None The target values (integers that correspond to classes in classification, real numbers in regres...
sklearn.modules.generated.sklearn.feature_selection.selectfrommodel#sklearn.feature_selection.SelectFromModel.fit
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.feature_selection.selectfrommodel#sklearn.feature_selection.SelectFromModel.fit_transform
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.feature_selection.selectfrommodel#sklearn.feature_selection.SelectFromModel.get_params
get_support(indices=False) [source] Get a mask, or integer index, of the features selected Parameters indicesbool, default=False If True, the return value will be an array of integers, rather than a boolean mask. Returns supportarray An index that selects the retained features from a feature vector. If ...
sklearn.modules.generated.sklearn.feature_selection.selectfrommodel#sklearn.feature_selection.SelectFromModel.get_support
inverse_transform(X) [source] Reverse the transformation operation Parameters Xarray of shape [n_samples, n_selected_features] The input samples. Returns X_rarray of shape [n_samples, n_original_features] X with columns of zeros inserted where features would have been removed by transform.
sklearn.modules.generated.sklearn.feature_selection.selectfrommodel#sklearn.feature_selection.SelectFromModel.inverse_transform
partial_fit(X, y=None, **fit_params) [source] Fit the SelectFromModel meta-transformer only once. Parameters Xarray-like of shape (n_samples, n_features) The training input samples. yarray-like of shape (n_samples,), default=None The target values (integers that correspond to classes in classification, real...
sklearn.modules.generated.sklearn.feature_selection.selectfrommodel#sklearn.feature_selection.SelectFromModel.partial_fit
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.feature_selection.selectfrommodel#sklearn.feature_selection.SelectFromModel.set_params
transform(X) [source] Reduce X to the selected features. Parameters Xarray of shape [n_samples, n_features] The input samples. Returns X_rarray of shape [n_samples, n_selected_features] The input samples with only the selected features.
sklearn.modules.generated.sklearn.feature_selection.selectfrommodel#sklearn.feature_selection.SelectFromModel.transform
class sklearn.feature_selection.SelectFwe(score_func=<function f_classif>, *, alpha=0.05) [source] Filter: Select the p-values corresponding to Family-wise error rate Read more in the User Guide. Parameters score_funccallable, default=f_classif Function taking two arrays X and y, and returning a pair of arrays ...
sklearn.modules.generated.sklearn.feature_selection.selectfwe#sklearn.feature_selection.SelectFwe
sklearn.feature_selection.SelectFwe class sklearn.feature_selection.SelectFwe(score_func=<function f_classif>, *, alpha=0.05) [source] Filter: Select the p-values corresponding to Family-wise error rate Read more in the User Guide. Parameters score_funccallable, default=f_classif Function taking two arrays X ...
sklearn.modules.generated.sklearn.feature_selection.selectfwe
fit(X, y) [source] Run score function on (X, y) and get the appropriate features. Parameters Xarray-like of shape (n_samples, n_features) The training input samples. yarray-like of shape (n_samples,) The target values (class labels in classification, real numbers in regression). Returns selfobject
sklearn.modules.generated.sklearn.feature_selection.selectfwe#sklearn.feature_selection.SelectFwe.fit
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.feature_selection.selectfwe#sklearn.feature_selection.SelectFwe.fit_transform
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.feature_selection.selectfwe#sklearn.feature_selection.SelectFwe.get_params
get_support(indices=False) [source] Get a mask, or integer index, of the features selected Parameters indicesbool, default=False If True, the return value will be an array of integers, rather than a boolean mask. Returns supportarray An index that selects the retained features from a feature vector. If ...
sklearn.modules.generated.sklearn.feature_selection.selectfwe#sklearn.feature_selection.SelectFwe.get_support
inverse_transform(X) [source] Reverse the transformation operation Parameters Xarray of shape [n_samples, n_selected_features] The input samples. Returns X_rarray of shape [n_samples, n_original_features] X with columns of zeros inserted where features would have been removed by transform.
sklearn.modules.generated.sklearn.feature_selection.selectfwe#sklearn.feature_selection.SelectFwe.inverse_transform
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.feature_selection.selectfwe#sklearn.feature_selection.SelectFwe.set_params
transform(X) [source] Reduce X to the selected features. Parameters Xarray of shape [n_samples, n_features] The input samples. Returns X_rarray of shape [n_samples, n_selected_features] The input samples with only the selected features.
sklearn.modules.generated.sklearn.feature_selection.selectfwe#sklearn.feature_selection.SelectFwe.transform
class sklearn.feature_selection.SelectKBest(score_func=<function f_classif>, *, k=10) [source] Select features according to the k highest scores. Read more in the User Guide. Parameters score_funccallable, default=f_classif Function taking two arrays X and y, and returning a pair of arrays (scores, pvalues) or ...
sklearn.modules.generated.sklearn.feature_selection.selectkbest#sklearn.feature_selection.SelectKBest
sklearn.feature_selection.SelectKBest class sklearn.feature_selection.SelectKBest(score_func=<function f_classif>, *, k=10) [source] Select features according to the k highest scores. Read more in the User Guide. Parameters score_funccallable, default=f_classif Function taking two arrays X and y, and returnin...
sklearn.modules.generated.sklearn.feature_selection.selectkbest
fit(X, y) [source] Run score function on (X, y) and get the appropriate features. Parameters Xarray-like of shape (n_samples, n_features) The training input samples. yarray-like of shape (n_samples,) The target values (class labels in classification, real numbers in regression). Returns selfobject
sklearn.modules.generated.sklearn.feature_selection.selectkbest#sklearn.feature_selection.SelectKBest.fit
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.feature_selection.selectkbest#sklearn.feature_selection.SelectKBest.fit_transform
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.feature_selection.selectkbest#sklearn.feature_selection.SelectKBest.get_params
get_support(indices=False) [source] Get a mask, or integer index, of the features selected Parameters indicesbool, default=False If True, the return value will be an array of integers, rather than a boolean mask. Returns supportarray An index that selects the retained features from a feature vector. If ...
sklearn.modules.generated.sklearn.feature_selection.selectkbest#sklearn.feature_selection.SelectKBest.get_support
inverse_transform(X) [source] Reverse the transformation operation Parameters Xarray of shape [n_samples, n_selected_features] The input samples. Returns X_rarray of shape [n_samples, n_original_features] X with columns of zeros inserted where features would have been removed by transform.
sklearn.modules.generated.sklearn.feature_selection.selectkbest#sklearn.feature_selection.SelectKBest.inverse_transform
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.feature_selection.selectkbest#sklearn.feature_selection.SelectKBest.set_params
transform(X) [source] Reduce X to the selected features. Parameters Xarray of shape [n_samples, n_features] The input samples. Returns X_rarray of shape [n_samples, n_selected_features] The input samples with only the selected features.
sklearn.modules.generated.sklearn.feature_selection.selectkbest#sklearn.feature_selection.SelectKBest.transform
class sklearn.feature_selection.SelectorMixin [source] Transformer mixin that performs feature selection given a support mask This mixin provides a feature selector implementation with transform and inverse_transform functionality given an implementation of _get_support_mask. Methods fit_transform(X[, y]) Fit to da...
sklearn.modules.generated.sklearn.feature_selection.selectormixin#sklearn.feature_selection.SelectorMixin
sklearn.feature_selection.SelectorMixin class sklearn.feature_selection.SelectorMixin [source] Transformer mixin that performs feature selection given a support mask This mixin provides a feature selector implementation with transform and inverse_transform functionality given an implementation of _get_support_mask....
sklearn.modules.generated.sklearn.feature_selection.selectormixin
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.feature_selection.selectormixin#sklearn.feature_selection.SelectorMixin.fit_transform
get_support(indices=False) [source] Get a mask, or integer index, of the features selected Parameters indicesbool, default=False If True, the return value will be an array of integers, rather than a boolean mask. Returns supportarray An index that selects the retained features from a feature vector. If ...
sklearn.modules.generated.sklearn.feature_selection.selectormixin#sklearn.feature_selection.SelectorMixin.get_support
inverse_transform(X) [source] Reverse the transformation operation Parameters Xarray of shape [n_samples, n_selected_features] The input samples. Returns X_rarray of shape [n_samples, n_original_features] X with columns of zeros inserted where features would have been removed by transform.
sklearn.modules.generated.sklearn.feature_selection.selectormixin#sklearn.feature_selection.SelectorMixin.inverse_transform
transform(X) [source] Reduce X to the selected features. Parameters Xarray of shape [n_samples, n_features] The input samples. Returns X_rarray of shape [n_samples, n_selected_features] The input samples with only the selected features.
sklearn.modules.generated.sklearn.feature_selection.selectormixin#sklearn.feature_selection.SelectorMixin.transform
class sklearn.feature_selection.SelectPercentile(score_func=<function f_classif>, *, percentile=10) [source] Select features according to a percentile of the highest scores. Read more in the User Guide. Parameters score_funccallable, default=f_classif Function taking two arrays X and y, and returning a pair of ...
sklearn.modules.generated.sklearn.feature_selection.selectpercentile#sklearn.feature_selection.SelectPercentile
sklearn.feature_selection.SelectPercentile class sklearn.feature_selection.SelectPercentile(score_func=<function f_classif>, *, percentile=10) [source] Select features according to a percentile of the highest scores. Read more in the User Guide. Parameters score_funccallable, default=f_classif Function taking...
sklearn.modules.generated.sklearn.feature_selection.selectpercentile
fit(X, y) [source] Run score function on (X, y) and get the appropriate features. Parameters Xarray-like of shape (n_samples, n_features) The training input samples. yarray-like of shape (n_samples,) The target values (class labels in classification, real numbers in regression). Returns selfobject
sklearn.modules.generated.sklearn.feature_selection.selectpercentile#sklearn.feature_selection.SelectPercentile.fit
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.feature_selection.selectpercentile#sklearn.feature_selection.SelectPercentile.fit_transform
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.feature_selection.selectpercentile#sklearn.feature_selection.SelectPercentile.get_params
get_support(indices=False) [source] Get a mask, or integer index, of the features selected Parameters indicesbool, default=False If True, the return value will be an array of integers, rather than a boolean mask. Returns supportarray An index that selects the retained features from a feature vector. If ...
sklearn.modules.generated.sklearn.feature_selection.selectpercentile#sklearn.feature_selection.SelectPercentile.get_support
inverse_transform(X) [source] Reverse the transformation operation Parameters Xarray of shape [n_samples, n_selected_features] The input samples. Returns X_rarray of shape [n_samples, n_original_features] X with columns of zeros inserted where features would have been removed by transform.
sklearn.modules.generated.sklearn.feature_selection.selectpercentile#sklearn.feature_selection.SelectPercentile.inverse_transform
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.feature_selection.selectpercentile#sklearn.feature_selection.SelectPercentile.set_params
transform(X) [source] Reduce X to the selected features. Parameters Xarray of shape [n_samples, n_features] The input samples. Returns X_rarray of shape [n_samples, n_selected_features] The input samples with only the selected features.
sklearn.modules.generated.sklearn.feature_selection.selectpercentile#sklearn.feature_selection.SelectPercentile.transform
class sklearn.feature_selection.SequentialFeatureSelector(estimator, *, n_features_to_select=None, direction='forward', scoring=None, cv=5, n_jobs=None) [source] Transformer that performs Sequential Feature Selection. This Sequential Feature Selector adds (forward selection) or removes (backward selection) features t...
sklearn.modules.generated.sklearn.feature_selection.sequentialfeatureselector#sklearn.feature_selection.SequentialFeatureSelector
sklearn.feature_selection.SequentialFeatureSelector class sklearn.feature_selection.SequentialFeatureSelector(estimator, *, n_features_to_select=None, direction='forward', scoring=None, cv=5, n_jobs=None) [source] Transformer that performs Sequential Feature Selection. This Sequential Feature Selector adds (forward...
sklearn.modules.generated.sklearn.feature_selection.sequentialfeatureselector
fit(X, y) [source] Learn the features to select. Parameters Xarray-like of shape (n_samples, n_features) Training vectors. yarray-like of shape (n_samples,) Target values. Returns selfobject
sklearn.modules.generated.sklearn.feature_selection.sequentialfeatureselector#sklearn.feature_selection.SequentialFeatureSelector.fit
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.feature_selection.sequentialfeatureselector#sklearn.feature_selection.SequentialFeatureSelector.fit_transform
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.feature_selection.sequentialfeatureselector#sklearn.feature_selection.SequentialFeatureSelector.get_params
get_support(indices=False) [source] Get a mask, or integer index, of the features selected Parameters indicesbool, default=False If True, the return value will be an array of integers, rather than a boolean mask. Returns supportarray An index that selects the retained features from a feature vector. If ...
sklearn.modules.generated.sklearn.feature_selection.sequentialfeatureselector#sklearn.feature_selection.SequentialFeatureSelector.get_support
inverse_transform(X) [source] Reverse the transformation operation Parameters Xarray of shape [n_samples, n_selected_features] The input samples. Returns X_rarray of shape [n_samples, n_original_features] X with columns of zeros inserted where features would have been removed by transform.
sklearn.modules.generated.sklearn.feature_selection.sequentialfeatureselector#sklearn.feature_selection.SequentialFeatureSelector.inverse_transform
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.feature_selection.sequentialfeatureselector#sklearn.feature_selection.SequentialFeatureSelector.set_params
transform(X) [source] Reduce X to the selected features. Parameters Xarray of shape [n_samples, n_features] The input samples. Returns X_rarray of shape [n_samples, n_selected_features] The input samples with only the selected features.
sklearn.modules.generated.sklearn.feature_selection.sequentialfeatureselector#sklearn.feature_selection.SequentialFeatureSelector.transform
class sklearn.feature_selection.VarianceThreshold(threshold=0.0) [source] Feature selector that removes all low-variance features. This feature selection algorithm looks only at the features (X), not the desired outputs (y), and can thus be used for unsupervised learning. Read more in the User Guide. Parameters t...
sklearn.modules.generated.sklearn.feature_selection.variancethreshold#sklearn.feature_selection.VarianceThreshold
sklearn.feature_selection.VarianceThreshold class sklearn.feature_selection.VarianceThreshold(threshold=0.0) [source] Feature selector that removes all low-variance features. This feature selection algorithm looks only at the features (X), not the desired outputs (y), and can thus be used for unsupervised learning....
sklearn.modules.generated.sklearn.feature_selection.variancethreshold
fit(X, y=None) [source] Learn empirical variances from X. Parameters X{array-like, sparse matrix}, shape (n_samples, n_features) Sample vectors from which to compute variances. yany, default=None Ignored. This parameter exists only for compatibility with sklearn.pipeline.Pipeline. Returns self
sklearn.modules.generated.sklearn.feature_selection.variancethreshold#sklearn.feature_selection.VarianceThreshold.fit
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.feature_selection.variancethreshold#sklearn.feature_selection.VarianceThreshold.fit_transform
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.feature_selection.variancethreshold#sklearn.feature_selection.VarianceThreshold.get_params
get_support(indices=False) [source] Get a mask, or integer index, of the features selected Parameters indicesbool, default=False If True, the return value will be an array of integers, rather than a boolean mask. Returns supportarray An index that selects the retained features from a feature vector. If ...
sklearn.modules.generated.sklearn.feature_selection.variancethreshold#sklearn.feature_selection.VarianceThreshold.get_support
inverse_transform(X) [source] Reverse the transformation operation Parameters Xarray of shape [n_samples, n_selected_features] The input samples. Returns X_rarray of shape [n_samples, n_original_features] X with columns of zeros inserted where features would have been removed by transform.
sklearn.modules.generated.sklearn.feature_selection.variancethreshold#sklearn.feature_selection.VarianceThreshold.inverse_transform
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.feature_selection.variancethreshold#sklearn.feature_selection.VarianceThreshold.set_params
transform(X) [source] Reduce X to the selected features. Parameters Xarray of shape [n_samples, n_features] The input samples. Returns X_rarray of shape [n_samples, n_selected_features] The input samples with only the selected features.
sklearn.modules.generated.sklearn.feature_selection.variancethreshold#sklearn.feature_selection.VarianceThreshold.transform
class sklearn.gaussian_process.GaussianProcessClassifier(kernel=None, *, optimizer='fmin_l_bfgs_b', n_restarts_optimizer=0, max_iter_predict=100, warm_start=False, copy_X_train=True, random_state=None, multi_class='one_vs_rest', n_jobs=None) [source] Gaussian process classification (GPC) based on Laplace approximatio...
sklearn.modules.generated.sklearn.gaussian_process.gaussianprocessclassifier#sklearn.gaussian_process.GaussianProcessClassifier
sklearn.gaussian_process.GaussianProcessClassifier class sklearn.gaussian_process.GaussianProcessClassifier(kernel=None, *, optimizer='fmin_l_bfgs_b', n_restarts_optimizer=0, max_iter_predict=100, warm_start=False, copy_X_train=True, random_state=None, multi_class='one_vs_rest', n_jobs=None) [source] Gaussian proce...
sklearn.modules.generated.sklearn.gaussian_process.gaussianprocessclassifier
fit(X, y) [source] Fit Gaussian process classification model Parameters Xarray-like of shape (n_samples, n_features) or list of object Feature vectors or other representations of training data. yarray-like of shape (n_samples,) Target values, must be binary Returns selfreturns an instance of self.
sklearn.modules.generated.sklearn.gaussian_process.gaussianprocessclassifier#sklearn.gaussian_process.GaussianProcessClassifier.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.gaussian_process.gaussianprocessclassifier#sklearn.gaussian_process.GaussianProcessClassifier.get_params
log_marginal_likelihood(theta=None, eval_gradient=False, clone_kernel=True) [source] Returns log-marginal likelihood of theta for training data. In the case of multi-class classification, the mean log-marginal likelihood of the one-versus-rest classifiers are returned. Parameters thetaarray-like of shape (n_kerne...
sklearn.modules.generated.sklearn.gaussian_process.gaussianprocessclassifier#sklearn.gaussian_process.GaussianProcessClassifier.log_marginal_likelihood
predict(X) [source] Perform classification on an array of test vectors X. Parameters Xarray-like of shape (n_samples, n_features) or list of object Query points where the GP is evaluated for classification. Returns Cndarray of shape (n_samples,) Predicted target values for X, values are from classes_
sklearn.modules.generated.sklearn.gaussian_process.gaussianprocessclassifier#sklearn.gaussian_process.GaussianProcessClassifier.predict
predict_proba(X) [source] Return probability estimates for the test vector X. Parameters Xarray-like of shape (n_samples, n_features) or list of object Query points where the GP is evaluated for classification. Returns Carray-like of shape (n_samples, n_classes) Returns the probability of the samples fo...
sklearn.modules.generated.sklearn.gaussian_process.gaussianprocessclassifier#sklearn.gaussian_process.GaussianProcessClassifier.predict_proba
score(X, y, sample_weight=None) [source] Return 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_featur...
sklearn.modules.generated.sklearn.gaussian_process.gaussianprocessclassifier#sklearn.gaussian_process.GaussianProcessClassifier.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.gaussian_process.gaussianprocessclassifier#sklearn.gaussian_process.GaussianProcessClassifier.set_params
class sklearn.gaussian_process.GaussianProcessRegressor(kernel=None, *, alpha=1e-10, optimizer='fmin_l_bfgs_b', n_restarts_optimizer=0, normalize_y=False, copy_X_train=True, random_state=None) [source] Gaussian process regression (GPR). The implementation is based on Algorithm 2.1 of Gaussian Processes for Machine Le...
sklearn.modules.generated.sklearn.gaussian_process.gaussianprocessregressor#sklearn.gaussian_process.GaussianProcessRegressor
sklearn.gaussian_process.GaussianProcessRegressor class sklearn.gaussian_process.GaussianProcessRegressor(kernel=None, *, alpha=1e-10, optimizer='fmin_l_bfgs_b', n_restarts_optimizer=0, normalize_y=False, copy_X_train=True, random_state=None) [source] Gaussian process regression (GPR). The implementation is based o...
sklearn.modules.generated.sklearn.gaussian_process.gaussianprocessregressor
fit(X, y) [source] Fit Gaussian process regression model. Parameters Xarray-like of shape (n_samples, n_features) or list of object Feature vectors or other representations of training data. yarray-like of shape (n_samples,) or (n_samples, n_targets) Target values Returns selfreturns an instance of se...
sklearn.modules.generated.sklearn.gaussian_process.gaussianprocessregressor#sklearn.gaussian_process.GaussianProcessRegressor.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.gaussian_process.gaussianprocessregressor#sklearn.gaussian_process.GaussianProcessRegressor.get_params
log_marginal_likelihood(theta=None, eval_gradient=False, clone_kernel=True) [source] Returns log-marginal likelihood of theta for training data. Parameters thetaarray-like of shape (n_kernel_params,) default=None Kernel hyperparameters for which the log-marginal likelihood is evaluated. If None, the precomputed...
sklearn.modules.generated.sklearn.gaussian_process.gaussianprocessregressor#sklearn.gaussian_process.GaussianProcessRegressor.log_marginal_likelihood
predict(X, return_std=False, return_cov=False) [source] Predict using the Gaussian process regression model We can also predict based on an unfitted model by using the GP prior. In addition to the mean of the predictive distribution, also its standard deviation (return_std=True) or covariance (return_cov=True). Note ...
sklearn.modules.generated.sklearn.gaussian_process.gaussianprocessregressor#sklearn.gaussian_process.GaussianProcessRegressor.predict
sample_y(X, n_samples=1, random_state=0) [source] Draw samples from Gaussian process and evaluate at X. Parameters Xarray-like of shape (n_samples, n_features) or list of object Query points where the GP is evaluated. n_samplesint, default=1 The number of samples drawn from the Gaussian process random_sta...
sklearn.modules.generated.sklearn.gaussian_process.gaussianprocessregressor#sklearn.gaussian_process.GaussianProcessRegressor.sample_y
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.gaussian_process.gaussianprocessregressor#sklearn.gaussian_process.GaussianProcessRegressor.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.gaussian_process.gaussianprocessregressor#sklearn.gaussian_process.GaussianProcessRegressor.set_params
class sklearn.gaussian_process.kernels.CompoundKernel(kernels) [source] Kernel which is composed of a set of other kernels. New in version 0.18. Parameters kernelslist of Kernels The other kernels Attributes bounds Returns the log-transformed bounds on the theta. hyperparameters Returns a list of ...
sklearn.modules.generated.sklearn.gaussian_process.kernels.compoundkernel#sklearn.gaussian_process.kernels.CompoundKernel
sklearn.gaussian_process.kernels.CompoundKernel class sklearn.gaussian_process.kernels.CompoundKernel(kernels) [source] Kernel which is composed of a set of other kernels. New in version 0.18. Parameters kernelslist of Kernels The other kernels Attributes bounds Returns the log-transformed bounds on...
sklearn.modules.generated.sklearn.gaussian_process.kernels.compoundkernel
property bounds Returns the log-transformed bounds on the theta. Returns boundsarray of shape (n_dims, 2) The log-transformed bounds on the kernel’s hyperparameters theta
sklearn.modules.generated.sklearn.gaussian_process.kernels.compoundkernel#sklearn.gaussian_process.kernels.CompoundKernel.bounds
clone_with_theta(theta) [source] Returns a clone of self with given hyperparameters theta. Parameters thetandarray of shape (n_dims,) The hyperparameters
sklearn.modules.generated.sklearn.gaussian_process.kernels.compoundkernel#sklearn.gaussian_process.kernels.CompoundKernel.clone_with_theta
diag(X) [source] Returns the diagonal of the kernel k(X, X). The result of this method is identical to np.diag(self(X)); however, it can be evaluated more efficiently since only the diagonal is evaluated. Parameters Xarray-like of shape (n_samples_X, n_features) or list of object Argument to the kernel. Retu...
sklearn.modules.generated.sklearn.gaussian_process.kernels.compoundkernel#sklearn.gaussian_process.kernels.CompoundKernel.diag
get_params(deep=True) [source] Get parameters of this kernel. 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.gaussian_process.kernels.compoundkernel#sklearn.gaussian_process.kernels.CompoundKernel.get_params
property hyperparameters Returns a list of all hyperparameter specifications.
sklearn.modules.generated.sklearn.gaussian_process.kernels.compoundkernel#sklearn.gaussian_process.kernels.CompoundKernel.hyperparameters
is_stationary() [source] Returns whether the kernel is stationary.
sklearn.modules.generated.sklearn.gaussian_process.kernels.compoundkernel#sklearn.gaussian_process.kernels.CompoundKernel.is_stationary
property n_dims Returns the number of non-fixed hyperparameters of the kernel.
sklearn.modules.generated.sklearn.gaussian_process.kernels.compoundkernel#sklearn.gaussian_process.kernels.CompoundKernel.n_dims
property requires_vector_input Returns whether the kernel is defined on discrete structures.
sklearn.modules.generated.sklearn.gaussian_process.kernels.compoundkernel#sklearn.gaussian_process.kernels.CompoundKernel.requires_vector_input
set_params(**params) [source] Set the parameters of this kernel. The method works on simple kernels as well as on nested kernels. The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Returns self
sklearn.modules.generated.sklearn.gaussian_process.kernels.compoundkernel#sklearn.gaussian_process.kernels.CompoundKernel.set_params
property theta Returns the (flattened, log-transformed) non-fixed hyperparameters. Note that theta are typically the log-transformed values of the kernel’s hyperparameters as this representation of the search space is more amenable for hyperparameter search, as hyperparameters like length-scales naturally live on a l...
sklearn.modules.generated.sklearn.gaussian_process.kernels.compoundkernel#sklearn.gaussian_process.kernels.CompoundKernel.theta
__call__(X, Y=None, eval_gradient=False) [source] Return the kernel k(X, Y) and optionally its gradient. Note that this compound kernel returns the results of all simple kernel stacked along an additional axis. Parameters Xarray-like of shape (n_samples_X, n_features) or list of object, default=None Left argume...
sklearn.modules.generated.sklearn.gaussian_process.kernels.compoundkernel#sklearn.gaussian_process.kernels.CompoundKernel.__call__
class sklearn.gaussian_process.kernels.ConstantKernel(constant_value=1.0, constant_value_bounds=1e-05, 100000.0) [source] Constant kernel. Can be used as part of a product-kernel where it scales the magnitude of the other factor (kernel) or as part of a sum-kernel, where it modifies the mean of the Gaussian process. ...
sklearn.modules.generated.sklearn.gaussian_process.kernels.constantkernel#sklearn.gaussian_process.kernels.ConstantKernel
sklearn.gaussian_process.kernels.ConstantKernel class sklearn.gaussian_process.kernels.ConstantKernel(constant_value=1.0, constant_value_bounds=1e-05, 100000.0) [source] Constant kernel. Can be used as part of a product-kernel where it scales the magnitude of the other factor (kernel) or as part of a sum-kernel, wh...
sklearn.modules.generated.sklearn.gaussian_process.kernels.constantkernel
property bounds Returns the log-transformed bounds on the theta. Returns boundsndarray of shape (n_dims, 2) The log-transformed bounds on the kernel’s hyperparameters theta
sklearn.modules.generated.sklearn.gaussian_process.kernels.constantkernel#sklearn.gaussian_process.kernels.ConstantKernel.bounds
clone_with_theta(theta) [source] Returns a clone of self with given hyperparameters theta. Parameters thetandarray of shape (n_dims,) The hyperparameters
sklearn.modules.generated.sklearn.gaussian_process.kernels.constantkernel#sklearn.gaussian_process.kernels.ConstantKernel.clone_with_theta
diag(X) [source] Returns the diagonal of the kernel k(X, X). The result of this method is identical to np.diag(self(X)); however, it can be evaluated more efficiently since only the diagonal is evaluated. Parameters Xarray-like of shape (n_samples_X, n_features) or list of object Argument to the kernel. Retu...
sklearn.modules.generated.sklearn.gaussian_process.kernels.constantkernel#sklearn.gaussian_process.kernels.ConstantKernel.diag
get_params(deep=True) [source] Get parameters of this kernel. 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.gaussian_process.kernels.constantkernel#sklearn.gaussian_process.kernels.ConstantKernel.get_params
property hyperparameters Returns a list of all hyperparameter specifications.
sklearn.modules.generated.sklearn.gaussian_process.kernels.constantkernel#sklearn.gaussian_process.kernels.ConstantKernel.hyperparameters
is_stationary() [source] Returns whether the kernel is stationary.
sklearn.modules.generated.sklearn.gaussian_process.kernels.constantkernel#sklearn.gaussian_process.kernels.ConstantKernel.is_stationary
property n_dims Returns the number of non-fixed hyperparameters of the kernel.
sklearn.modules.generated.sklearn.gaussian_process.kernels.constantkernel#sklearn.gaussian_process.kernels.ConstantKernel.n_dims