doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
sklearn.preprocessing.OrdinalEncoder
class sklearn.preprocessing.OrdinalEncoder(*, categories='auto', dtype=<class 'numpy.float64'>, handle_unknown='error', unknown_value=None) [source]
Encode categorical features as an integer array. The input to this transformer should be an array-like of integers or strings, den... | sklearn.modules.generated.sklearn.preprocessing.ordinalencoder |
fit(X, y=None) [source]
Fit the OrdinalEncoder to X. Parameters
Xarray-like, shape [n_samples, n_features]
The data to determine the categories of each feature.
yNone
Ignored. This parameter exists only for compatibility with Pipeline. Returns
self | sklearn.modules.generated.sklearn.preprocessing.ordinalencoder#sklearn.preprocessing.OrdinalEncoder.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.preprocessing.ordinalencoder#sklearn.preprocessing.OrdinalEncoder.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.preprocessing.ordinalencoder#sklearn.preprocessing.OrdinalEncoder.get_params |
inverse_transform(X) [source]
Convert the data back to the original representation. Parameters
Xarray-like or sparse matrix, shape [n_samples, n_encoded_features]
The transformed data. Returns
X_trarray-like, shape [n_samples, n_features]
Inverse transformed array. | sklearn.modules.generated.sklearn.preprocessing.ordinalencoder#sklearn.preprocessing.OrdinalEncoder.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.preprocessing.ordinalencoder#sklearn.preprocessing.OrdinalEncoder.set_params |
transform(X) [source]
Transform X to ordinal codes. Parameters
Xarray-like, shape [n_samples, n_features]
The data to encode. Returns
X_outsparse matrix or a 2-d array
Transformed input. | sklearn.modules.generated.sklearn.preprocessing.ordinalencoder#sklearn.preprocessing.OrdinalEncoder.transform |
class sklearn.preprocessing.PolynomialFeatures(degree=2, *, interaction_only=False, include_bias=True, order='C') [source]
Generate polynomial and interaction features. Generate a new feature matrix consisting of all polynomial combinations of the features with degree less than or equal to the specified degree. For e... | sklearn.modules.generated.sklearn.preprocessing.polynomialfeatures#sklearn.preprocessing.PolynomialFeatures |
sklearn.preprocessing.PolynomialFeatures
class sklearn.preprocessing.PolynomialFeatures(degree=2, *, interaction_only=False, include_bias=True, order='C') [source]
Generate polynomial and interaction features. Generate a new feature matrix consisting of all polynomial combinations of the features with degree less t... | sklearn.modules.generated.sklearn.preprocessing.polynomialfeatures |
fit(X, y=None) [source]
Compute number of output features. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The data.
yNone
Ignored. Returns
selfobject
Fitted transformer. | sklearn.modules.generated.sklearn.preprocessing.polynomialfeatures#sklearn.preprocessing.PolynomialFeatures.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.preprocessing.polynomialfeatures#sklearn.preprocessing.PolynomialFeatures.fit_transform |
get_feature_names(input_features=None) [source]
Return feature names for output features Parameters
input_featureslist of str of shape (n_features,), default=None
String names for input features if available. By default, “x0”, “x1”, … “xn_features” is used. Returns
output_feature_nameslist of str of shape... | sklearn.modules.generated.sklearn.preprocessing.polynomialfeatures#sklearn.preprocessing.PolynomialFeatures.get_feature_names |
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.preprocessing.polynomialfeatures#sklearn.preprocessing.PolynomialFeatures.get_params |
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.preprocessing.polynomialfeatures#sklearn.preprocessing.PolynomialFeatures.set_params |
transform(X) [source]
Transform data to polynomial features Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The data to transform, row by row. Prefer CSR over CSC for sparse input (for speed), but CSC is required if the degree is 4 or higher. If the degree is less than 4 and the input f... | sklearn.modules.generated.sklearn.preprocessing.polynomialfeatures#sklearn.preprocessing.PolynomialFeatures.transform |
class sklearn.preprocessing.PowerTransformer(method='yeo-johnson', *, standardize=True, copy=True) [source]
Apply a power transform featurewise to make data more Gaussian-like. Power transforms are a family of parametric, monotonic transformations that are applied to make data more Gaussian-like. This is useful for m... | sklearn.modules.generated.sklearn.preprocessing.powertransformer#sklearn.preprocessing.PowerTransformer |
sklearn.preprocessing.PowerTransformer
class sklearn.preprocessing.PowerTransformer(method='yeo-johnson', *, standardize=True, copy=True) [source]
Apply a power transform featurewise to make data more Gaussian-like. Power transforms are a family of parametric, monotonic transformations that are applied to make data... | sklearn.modules.generated.sklearn.preprocessing.powertransformer |
fit(X, y=None) [source]
Estimate the optimal parameter lambda for each feature. The optimal lambda parameter for minimizing skewness is estimated on each feature independently using maximum likelihood. Parameters
Xarray-like of shape (n_samples, n_features)
The data used to estimate the optimal transformation p... | sklearn.modules.generated.sklearn.preprocessing.powertransformer#sklearn.preprocessing.PowerTransformer.fit |
fit_transform(X, y=None) [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_outputs), default=... | sklearn.modules.generated.sklearn.preprocessing.powertransformer#sklearn.preprocessing.PowerTransformer.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.preprocessing.powertransformer#sklearn.preprocessing.PowerTransformer.get_params |
inverse_transform(X) [source]
Apply the inverse power transformation using the fitted lambdas. The inverse of the Box-Cox transformation is given by: if lambda_ == 0:
X = exp(X_trans)
else:
X = (X_trans * lambda_ + 1) ** (1 / lambda_)
The inverse of the Yeo-Johnson transformation is given by: if X >= 0 and l... | sklearn.modules.generated.sklearn.preprocessing.powertransformer#sklearn.preprocessing.PowerTransformer.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.preprocessing.powertransformer#sklearn.preprocessing.PowerTransformer.set_params |
transform(X) [source]
Apply the power transform to each feature using the fitted lambdas. Parameters
Xarray-like of shape (n_samples, n_features)
The data to be transformed using a power transformation. Returns
X_transndarray of shape (n_samples, n_features)
The transformed data. | sklearn.modules.generated.sklearn.preprocessing.powertransformer#sklearn.preprocessing.PowerTransformer.transform |
sklearn.preprocessing.power_transform(X, method='yeo-johnson', *, standardize=True, copy=True) [source]
Power transforms are a family of parametric, monotonic transformations that are applied to make data more Gaussian-like. This is useful for modeling issues related to heteroscedasticity (non-constant variance), or ... | sklearn.modules.generated.sklearn.preprocessing.power_transform#sklearn.preprocessing.power_transform |
class sklearn.preprocessing.QuantileTransformer(*, n_quantiles=1000, output_distribution='uniform', ignore_implicit_zeros=False, subsample=100000, random_state=None, copy=True) [source]
Transform features using quantiles information. This method transforms the features to follow a uniform or a normal distribution. Th... | sklearn.modules.generated.sklearn.preprocessing.quantiletransformer#sklearn.preprocessing.QuantileTransformer |
sklearn.preprocessing.QuantileTransformer
class sklearn.preprocessing.QuantileTransformer(*, n_quantiles=1000, output_distribution='uniform', ignore_implicit_zeros=False, subsample=100000, random_state=None, copy=True) [source]
Transform features using quantiles information. This method transforms the features to f... | sklearn.modules.generated.sklearn.preprocessing.quantiletransformer |
fit(X, y=None) [source]
Compute the quantiles used for transforming. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The data used to scale along the features axis. If a sparse matrix is provided, it will be converted into a sparse csc_matrix. Additionally, the sparse matrix needs to be... | sklearn.modules.generated.sklearn.preprocessing.quantiletransformer#sklearn.preprocessing.QuantileTransformer.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.preprocessing.quantiletransformer#sklearn.preprocessing.QuantileTransformer.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.preprocessing.quantiletransformer#sklearn.preprocessing.QuantileTransformer.get_params |
inverse_transform(X) [source]
Back-projection to the original space. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The data used to scale along the features axis. If a sparse matrix is provided, it will be converted into a sparse csc_matrix. Additionally, the sparse matrix needs to be... | sklearn.modules.generated.sklearn.preprocessing.quantiletransformer#sklearn.preprocessing.QuantileTransformer.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.preprocessing.quantiletransformer#sklearn.preprocessing.QuantileTransformer.set_params |
transform(X) [source]
Feature-wise transformation of the data. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The data used to scale along the features axis. If a sparse matrix is provided, it will be converted into a sparse csc_matrix. Additionally, the sparse matrix needs to be nonne... | sklearn.modules.generated.sklearn.preprocessing.quantiletransformer#sklearn.preprocessing.QuantileTransformer.transform |
sklearn.preprocessing.quantile_transform(X, *, axis=0, n_quantiles=1000, output_distribution='uniform', ignore_implicit_zeros=False, subsample=100000, random_state=None, copy=True) [source]
Transform features using quantiles information. This method transforms the features to follow a uniform or a normal distribution... | sklearn.modules.generated.sklearn.preprocessing.quantile_transform#sklearn.preprocessing.quantile_transform |
class sklearn.preprocessing.RobustScaler(*, with_centering=True, with_scaling=True, quantile_range=25.0, 75.0, copy=True, unit_variance=False) [source]
Scale features using statistics that are robust to outliers. This Scaler removes the median and scales the data according to the quantile range (defaults to IQR: Inte... | sklearn.modules.generated.sklearn.preprocessing.robustscaler#sklearn.preprocessing.RobustScaler |
sklearn.preprocessing.RobustScaler
class sklearn.preprocessing.RobustScaler(*, with_centering=True, with_scaling=True, quantile_range=25.0, 75.0, copy=True, unit_variance=False) [source]
Scale features using statistics that are robust to outliers. This Scaler removes the median and scales the data according to the ... | sklearn.modules.generated.sklearn.preprocessing.robustscaler |
fit(X, y=None) [source]
Compute the median and quantiles to be used for scaling. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The data used to compute the median and quantiles used for later scaling along the features axis.
yNone
Ignored. Returns
selfobject
Fitted scaler. | sklearn.modules.generated.sklearn.preprocessing.robustscaler#sklearn.preprocessing.RobustScaler.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.preprocessing.robustscaler#sklearn.preprocessing.RobustScaler.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.preprocessing.robustscaler#sklearn.preprocessing.RobustScaler.get_params |
inverse_transform(X) [source]
Scale back the data to the original representation Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The rescaled data to be transformed back. Returns
X_tr{ndarray, sparse matrix} of shape (n_samples, n_features)
Transformed array. | sklearn.modules.generated.sklearn.preprocessing.robustscaler#sklearn.preprocessing.RobustScaler.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.preprocessing.robustscaler#sklearn.preprocessing.RobustScaler.set_params |
transform(X) [source]
Center and scale the data. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The data used to scale along the specified axis. Returns
X_tr{ndarray, sparse matrix} of shape (n_samples, n_features)
Transformed array. | sklearn.modules.generated.sklearn.preprocessing.robustscaler#sklearn.preprocessing.RobustScaler.transform |
sklearn.preprocessing.robust_scale(X, *, axis=0, with_centering=True, with_scaling=True, quantile_range=25.0, 75.0, copy=True, unit_variance=False) [source]
Standardize a dataset along any axis Center to the median and component wise scale according to the interquartile range. Read more in the User Guide. Parameters... | sklearn.modules.generated.sklearn.preprocessing.robust_scale#sklearn.preprocessing.robust_scale |
sklearn.preprocessing.scale(X, *, axis=0, with_mean=True, with_std=True, copy=True) [source]
Standardize a dataset along any axis. Center to the mean and component wise scale to unit variance. Read more in the User Guide. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The data to cente... | sklearn.modules.generated.sklearn.preprocessing.scale#sklearn.preprocessing.scale |
class sklearn.preprocessing.StandardScaler(*, copy=True, with_mean=True, with_std=True) [source]
Standardize features by removing the mean and scaling to unit variance The standard score of a sample x is calculated as: z = (x - u) / s where u is the mean of the training samples or zero if with_mean=False, and s is th... | sklearn.modules.generated.sklearn.preprocessing.standardscaler#sklearn.preprocessing.StandardScaler |
sklearn.preprocessing.StandardScaler
class sklearn.preprocessing.StandardScaler(*, copy=True, with_mean=True, with_std=True) [source]
Standardize features by removing the mean and scaling to unit variance The standard score of a sample x is calculated as: z = (x - u) / s where u is the mean of the training samples ... | sklearn.modules.generated.sklearn.preprocessing.standardscaler |
fit(X, y=None, sample_weight=None) [source]
Compute the mean and std to be used for later scaling. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The data used to compute the mean and standard deviation used for later scaling along the features axis.
yNone
Ignored.
sample_weighta... | sklearn.modules.generated.sklearn.preprocessing.standardscaler#sklearn.preprocessing.StandardScaler.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.preprocessing.standardscaler#sklearn.preprocessing.StandardScaler.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.preprocessing.standardscaler#sklearn.preprocessing.StandardScaler.get_params |
inverse_transform(X, copy=None) [source]
Scale back the data to the original representation Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The data used to scale along the features axis.
copybool, default=None
Copy the input X or not. Returns
X_tr{ndarray, sparse matrix} of s... | sklearn.modules.generated.sklearn.preprocessing.standardscaler#sklearn.preprocessing.StandardScaler.inverse_transform |
partial_fit(X, y=None, sample_weight=None) [source]
Online computation of mean and std on X for later scaling. All of X is processed as a single batch. This is intended for cases when fit is not feasible due to very large number of n_samples or because X is read from a continuous stream. The algorithm for incremental... | sklearn.modules.generated.sklearn.preprocessing.standardscaler#sklearn.preprocessing.StandardScaler.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.preprocessing.standardscaler#sklearn.preprocessing.StandardScaler.set_params |
transform(X, copy=None) [source]
Perform standardization by centering and scaling Parameters
X{array-like, sparse matrix of shape (n_samples, n_features)
The data used to scale along the features axis.
copybool, default=None
Copy the input X or not. Returns
X_tr{ndarray, sparse matrix} of shape (n_sam... | sklearn.modules.generated.sklearn.preprocessing.standardscaler#sklearn.preprocessing.StandardScaler.transform |
class sklearn.random_projection.GaussianRandomProjection(n_components='auto', *, eps=0.1, random_state=None) [source]
Reduce dimensionality through Gaussian random projection. The components of the random matrix are drawn from N(0, 1 / n_components). Read more in the User Guide. New in version 0.13. Parameters
... | sklearn.modules.generated.sklearn.random_projection.gaussianrandomprojection#sklearn.random_projection.GaussianRandomProjection |
sklearn.random_projection.GaussianRandomProjection
class sklearn.random_projection.GaussianRandomProjection(n_components='auto', *, eps=0.1, random_state=None) [source]
Reduce dimensionality through Gaussian random projection. The components of the random matrix are drawn from N(0, 1 / n_components). Read more in t... | sklearn.modules.generated.sklearn.random_projection.gaussianrandomprojection |
fit(X, y=None) [source]
Generate a sparse random projection matrix. Parameters
X{ndarray, sparse matrix} of shape (n_samples, n_features)
Training set: only the shape is used to find optimal random matrix dimensions based on the theory referenced in the afore mentioned papers. y
Ignored Returns
self | sklearn.modules.generated.sklearn.random_projection.gaussianrandomprojection#sklearn.random_projection.GaussianRandomProjection.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.random_projection.gaussianrandomprojection#sklearn.random_projection.GaussianRandomProjection.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.random_projection.gaussianrandomprojection#sklearn.random_projection.GaussianRandomProjection.get_params |
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.random_projection.gaussianrandomprojection#sklearn.random_projection.GaussianRandomProjection.set_params |
transform(X) [source]
Project the data by using matrix product with the random matrix Parameters
X{ndarray, sparse matrix} of shape (n_samples, n_features)
The input data to project into a smaller dimensional space. Returns
X_new{ndarray, sparse matrix} of shape (n_samples, n_components)
Projected array... | sklearn.modules.generated.sklearn.random_projection.gaussianrandomprojection#sklearn.random_projection.GaussianRandomProjection.transform |
sklearn.random_projection.johnson_lindenstrauss_min_dim(n_samples, *, eps=0.1) [source]
Find a ‘safe’ number of components to randomly project to. The distortion introduced by a random projection p only changes the distance between two points by a factor (1 +- eps) in an euclidean space with good probability. The pro... | sklearn.modules.generated.sklearn.random_projection.johnson_lindenstrauss_min_dim#sklearn.random_projection.johnson_lindenstrauss_min_dim |
class sklearn.random_projection.SparseRandomProjection(n_components='auto', *, density='auto', eps=0.1, dense_output=False, random_state=None) [source]
Reduce dimensionality through sparse random projection. Sparse random matrix is an alternative to dense random projection matrix that guarantees similar embedding qua... | sklearn.modules.generated.sklearn.random_projection.sparserandomprojection#sklearn.random_projection.SparseRandomProjection |
sklearn.random_projection.SparseRandomProjection
class sklearn.random_projection.SparseRandomProjection(n_components='auto', *, density='auto', eps=0.1, dense_output=False, random_state=None) [source]
Reduce dimensionality through sparse random projection. Sparse random matrix is an alternative to dense random proj... | sklearn.modules.generated.sklearn.random_projection.sparserandomprojection |
fit(X, y=None) [source]
Generate a sparse random projection matrix. Parameters
X{ndarray, sparse matrix} of shape (n_samples, n_features)
Training set: only the shape is used to find optimal random matrix dimensions based on the theory referenced in the afore mentioned papers. y
Ignored Returns
self | sklearn.modules.generated.sklearn.random_projection.sparserandomprojection#sklearn.random_projection.SparseRandomProjection.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.random_projection.sparserandomprojection#sklearn.random_projection.SparseRandomProjection.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.random_projection.sparserandomprojection#sklearn.random_projection.SparseRandomProjection.get_params |
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.random_projection.sparserandomprojection#sklearn.random_projection.SparseRandomProjection.set_params |
transform(X) [source]
Project the data by using matrix product with the random matrix Parameters
X{ndarray, sparse matrix} of shape (n_samples, n_features)
The input data to project into a smaller dimensional space. Returns
X_new{ndarray, sparse matrix} of shape (n_samples, n_components)
Projected array... | sklearn.modules.generated.sklearn.random_projection.sparserandomprojection#sklearn.random_projection.SparseRandomProjection.transform |
class sklearn.semi_supervised.LabelPropagation(kernel='rbf', *, gamma=20, n_neighbors=7, max_iter=1000, tol=0.001, n_jobs=None) [source]
Label Propagation classifier Read more in the User Guide. Parameters
kernel{‘knn’, ‘rbf’} or callable, default=’rbf’
String identifier for kernel function to use or the kernel... | sklearn.modules.generated.sklearn.semi_supervised.labelpropagation#sklearn.semi_supervised.LabelPropagation |
sklearn.semi_supervised.LabelPropagation
class sklearn.semi_supervised.LabelPropagation(kernel='rbf', *, gamma=20, n_neighbors=7, max_iter=1000, tol=0.001, n_jobs=None) [source]
Label Propagation classifier Read more in the User Guide. Parameters
kernel{‘knn’, ‘rbf’} or callable, default=’rbf’
String identifi... | sklearn.modules.generated.sklearn.semi_supervised.labelpropagation |
fit(X, y) [source]
Fit a semi-supervised label propagation model based All the input data is provided matrix X (labeled and unlabeled) and corresponding label matrix y with a dedicated marker value for unlabeled samples. Parameters
Xarray-like of shape (n_samples, n_features)
A matrix of shape (n_samples, n_sam... | sklearn.modules.generated.sklearn.semi_supervised.labelpropagation#sklearn.semi_supervised.LabelPropagation.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.semi_supervised.labelpropagation#sklearn.semi_supervised.LabelPropagation.get_params |
predict(X) [source]
Performs inductive inference across the model. Parameters
Xarray-like of shape (n_samples, n_features)
The data matrix. Returns
yndarray of shape (n_samples,)
Predictions for input data. | sklearn.modules.generated.sklearn.semi_supervised.labelpropagation#sklearn.semi_supervised.LabelPropagation.predict |
predict_proba(X) [source]
Predict probability for each possible outcome. Compute the probability estimates for each single sample in X and each possible outcome seen during training (categorical distribution). Parameters
Xarray-like of shape (n_samples, n_features)
The data matrix. Returns
probabilitiesnd... | sklearn.modules.generated.sklearn.semi_supervised.labelpropagation#sklearn.semi_supervised.LabelPropagation.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.semi_supervised.labelpropagation#sklearn.semi_supervised.LabelPropagation.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.semi_supervised.labelpropagation#sklearn.semi_supervised.LabelPropagation.set_params |
class sklearn.semi_supervised.LabelSpreading(kernel='rbf', *, gamma=20, n_neighbors=7, alpha=0.2, max_iter=30, tol=0.001, n_jobs=None) [source]
LabelSpreading model for semi-supervised learning This model is similar to the basic Label Propagation algorithm, but uses affinity matrix based on the normalized graph Lapla... | sklearn.modules.generated.sklearn.semi_supervised.labelspreading#sklearn.semi_supervised.LabelSpreading |
sklearn.semi_supervised.LabelSpreading
class sklearn.semi_supervised.LabelSpreading(kernel='rbf', *, gamma=20, n_neighbors=7, alpha=0.2, max_iter=30, tol=0.001, n_jobs=None) [source]
LabelSpreading model for semi-supervised learning This model is similar to the basic Label Propagation algorithm, but uses affinity m... | sklearn.modules.generated.sklearn.semi_supervised.labelspreading |
fit(X, y) [source]
Fit a semi-supervised label propagation model based All the input data is provided matrix X (labeled and unlabeled) and corresponding label matrix y with a dedicated marker value for unlabeled samples. Parameters
Xarray-like of shape (n_samples, n_features)
A matrix of shape (n_samples, n_sam... | sklearn.modules.generated.sklearn.semi_supervised.labelspreading#sklearn.semi_supervised.LabelSpreading.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.semi_supervised.labelspreading#sklearn.semi_supervised.LabelSpreading.get_params |
predict(X) [source]
Performs inductive inference across the model. Parameters
Xarray-like of shape (n_samples, n_features)
The data matrix. Returns
yndarray of shape (n_samples,)
Predictions for input data. | sklearn.modules.generated.sklearn.semi_supervised.labelspreading#sklearn.semi_supervised.LabelSpreading.predict |
predict_proba(X) [source]
Predict probability for each possible outcome. Compute the probability estimates for each single sample in X and each possible outcome seen during training (categorical distribution). Parameters
Xarray-like of shape (n_samples, n_features)
The data matrix. Returns
probabilitiesnd... | sklearn.modules.generated.sklearn.semi_supervised.labelspreading#sklearn.semi_supervised.LabelSpreading.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.semi_supervised.labelspreading#sklearn.semi_supervised.LabelSpreading.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.semi_supervised.labelspreading#sklearn.semi_supervised.LabelSpreading.set_params |
class sklearn.semi_supervised.SelfTrainingClassifier(base_estimator, threshold=0.75, criterion='threshold', k_best=10, max_iter=10, verbose=False) [source]
Self-training classifier. This class allows a given supervised classifier to function as a semi-supervised classifier, allowing it to learn from unlabeled data. I... | sklearn.modules.generated.sklearn.semi_supervised.selftrainingclassifier#sklearn.semi_supervised.SelfTrainingClassifier |
sklearn.semi_supervised.SelfTrainingClassifier
class sklearn.semi_supervised.SelfTrainingClassifier(base_estimator, threshold=0.75, criterion='threshold', k_best=10, max_iter=10, verbose=False) [source]
Self-training classifier. This class allows a given supervised classifier to function as a semi-supervised classi... | sklearn.modules.generated.sklearn.semi_supervised.selftrainingclassifier |
decision_function(X) [source]
Calls decision function of the base_estimator. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Array representing the data. Returns
yndarray of shape (n_samples, n_features)
Result of the decision function of the base_estimator. | sklearn.modules.generated.sklearn.semi_supervised.selftrainingclassifier#sklearn.semi_supervised.SelfTrainingClassifier.decision_function |
fit(X, y) [source]
Fits this SelfTrainingClassifier to a dataset. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Array representing the data.
y{array-like, sparse matrix} of shape (n_samples,)
Array representing the labels. Unlabeled samples should have the label -1. Returns
... | sklearn.modules.generated.sklearn.semi_supervised.selftrainingclassifier#sklearn.semi_supervised.SelfTrainingClassifier.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.semi_supervised.selftrainingclassifier#sklearn.semi_supervised.SelfTrainingClassifier.get_params |
predict(X) [source]
Predict the classes of X. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Array representing the data. Returns
yndarray of shape (n_samples,)
Array with predicted labels. | sklearn.modules.generated.sklearn.semi_supervised.selftrainingclassifier#sklearn.semi_supervised.SelfTrainingClassifier.predict |
predict_log_proba(X) [source]
Predict log probability for each possible outcome. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Array representing the data. Returns
yndarray of shape (n_samples, n_features)
Array with log prediction probabilities. | sklearn.modules.generated.sklearn.semi_supervised.selftrainingclassifier#sklearn.semi_supervised.SelfTrainingClassifier.predict_log_proba |
predict_proba(X) [source]
Predict probability for each possible outcome. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Array representing the data. Returns
yndarray of shape (n_samples, n_features)
Array with prediction probabilities. | sklearn.modules.generated.sklearn.semi_supervised.selftrainingclassifier#sklearn.semi_supervised.SelfTrainingClassifier.predict_proba |
score(X, y) [source]
Calls score on the base_estimator. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Array representing the data.
yarray-like of shape (n_samples,)
Array representing the labels. Returns
scorefloat
Result of calling score on the base_estimator. | sklearn.modules.generated.sklearn.semi_supervised.selftrainingclassifier#sklearn.semi_supervised.SelfTrainingClassifier.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.semi_supervised.selftrainingclassifier#sklearn.semi_supervised.SelfTrainingClassifier.set_params |
sklearn.set_config(assume_finite=None, working_memory=None, print_changed_only=None, display=None) [source]
Set global scikit-learn configuration New in version 0.19. Parameters
assume_finitebool, default=None
If True, validation for finiteness will be skipped, saving time, but leading to potential crashes. I... | sklearn.modules.generated.sklearn.set_config#sklearn.set_config |
sklearn.show_versions() [source]
Print useful debugging information” New in version 0.20. | sklearn.modules.generated.sklearn.show_versions#sklearn.show_versions |
sklearn.base.clone
sklearn.base.clone(estimator, *, safe=True) [source]
Constructs a new unfitted estimator with the same parameters. Clone does a deep copy of the model in an estimator without actually copying attached data. It yields a new estimator with the same parameters that has not been fitted on any data. I... | sklearn.modules.generated.sklearn.base.clone |
sklearn.base.is_classifier
sklearn.base.is_classifier(estimator) [source]
Return True if the given estimator is (probably) a classifier. Parameters
estimatorobject
Estimator object to test. Returns
outbool
True if estimator is a classifier and False otherwise. | sklearn.modules.generated.sklearn.base.is_classifier |
sklearn.base.is_regressor
sklearn.base.is_regressor(estimator) [source]
Return True if the given estimator is (probably) a regressor. Parameters
estimatorestimator instance
Estimator object to test. Returns
outbool
True if estimator is a regressor and False otherwise. | sklearn.modules.generated.sklearn.base.is_regressor |
sklearn.calibration.calibration_curve
sklearn.calibration.calibration_curve(y_true, y_prob, *, normalize=False, n_bins=5, strategy='uniform') [source]
Compute true and predicted probabilities for a calibration curve. The method assumes the inputs come from a binary classifier, and discretize the [0, 1] interval int... | sklearn.modules.generated.sklearn.calibration.calibration_curve |
sklearn.cluster.affinity_propagation
sklearn.cluster.affinity_propagation(S, *, preference=None, convergence_iter=15, max_iter=200, damping=0.5, copy=True, verbose=False, return_n_iter=False, random_state='warn') [source]
Perform Affinity Propagation Clustering of data. Read more in the User Guide. Parameters
S... | sklearn.modules.generated.sklearn.cluster.affinity_propagation |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.