doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
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.ensemble.randomtreesembedding#sklearn.ensemble.RandomTreesEmbedding.set_params
transform(X) [source] Transform dataset. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Input data to be transformed. Use dtype=np.float32 for maximum efficiency. Sparse matrices are also supported, use sparse csr_matrix for maximum efficiency. Returns X_transformedsparse matrix ...
sklearn.modules.generated.sklearn.ensemble.randomtreesembedding#sklearn.ensemble.RandomTreesEmbedding.transform
class sklearn.ensemble.StackingClassifier(estimators, final_estimator=None, *, cv=None, stack_method='auto', n_jobs=None, passthrough=False, verbose=0) [source] Stack of estimators with a final classifier. Stacked generalization consists in stacking the output of individual estimator and use a classifier to compute t...
sklearn.modules.generated.sklearn.ensemble.stackingclassifier#sklearn.ensemble.StackingClassifier
sklearn.ensemble.StackingClassifier class sklearn.ensemble.StackingClassifier(estimators, final_estimator=None, *, cv=None, stack_method='auto', n_jobs=None, passthrough=False, verbose=0) [source] Stack of estimators with a final classifier. Stacked generalization consists in stacking the output of individual estim...
sklearn.modules.generated.sklearn.ensemble.stackingclassifier
decision_function(X) [source] Predict decision function for samples in X using final_estimator_.decision_function. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vectors, where n_samples is the number of samples and n_features is the number of features. Returns decisions...
sklearn.modules.generated.sklearn.ensemble.stackingclassifier#sklearn.ensemble.StackingClassifier.decision_function
fit(X, y, sample_weight=None) [source] Fit the estimators. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vectors, where n_samples is the number of samples and n_features is the number of features. yarray-like of shape (n_samples,) Target values. sample_weightarray-like ...
sklearn.modules.generated.sklearn.ensemble.stackingclassifier#sklearn.ensemble.StackingClassifier.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.ensemble.stackingclassifier#sklearn.ensemble.StackingClassifier.fit_transform
get_params(deep=True) [source] Get the parameters of an estimator from the ensemble. Returns the parameters given in the constructor as well as the estimators contained within the estimators parameter. Parameters deepbool, default=True Setting it to True gets the various estimators and the parameters of the est...
sklearn.modules.generated.sklearn.ensemble.stackingclassifier#sklearn.ensemble.StackingClassifier.get_params
property n_features_in_ Number of features seen during fit.
sklearn.modules.generated.sklearn.ensemble.stackingclassifier#sklearn.ensemble.StackingClassifier.n_features_in_
predict(X, **predict_params) [source] Predict target for X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vectors, where n_samples is the number of samples and n_features is the number of features. **predict_paramsdict of str -> obj Parameters to the predict called by the...
sklearn.modules.generated.sklearn.ensemble.stackingclassifier#sklearn.ensemble.StackingClassifier.predict
predict_proba(X) [source] Predict class probabilities for X using final_estimator_.predict_proba. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vectors, where n_samples is the number of samples and n_features is the number of features. Returns probabilitiesndarray of sh...
sklearn.modules.generated.sklearn.ensemble.stackingclassifier#sklearn.ensemble.StackingClassifier.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.ensemble.stackingclassifier#sklearn.ensemble.StackingClassifier.score
set_params(**params) [source] Set the parameters of an estimator from the ensemble. Valid parameter keys can be listed with get_params(). Note that you can directly set the parameters of the estimators contained in estimators. Parameters **paramskeyword arguments Specific parameters using e.g. set_params(parame...
sklearn.modules.generated.sklearn.ensemble.stackingclassifier#sklearn.ensemble.StackingClassifier.set_params
transform(X) [source] Return class labels or probabilities for X for each estimator. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vectors, where n_samples is the number of samples and n_features is the number of features. Returns y_predsndarray of shape (n_samples, n_e...
sklearn.modules.generated.sklearn.ensemble.stackingclassifier#sklearn.ensemble.StackingClassifier.transform
class sklearn.ensemble.StackingRegressor(estimators, final_estimator=None, *, cv=None, n_jobs=None, passthrough=False, verbose=0) [source] Stack of estimators with a final regressor. Stacked generalization consists in stacking the output of individual estimator and use a regressor to compute the final prediction. Sta...
sklearn.modules.generated.sklearn.ensemble.stackingregressor#sklearn.ensemble.StackingRegressor
sklearn.ensemble.StackingRegressor class sklearn.ensemble.StackingRegressor(estimators, final_estimator=None, *, cv=None, n_jobs=None, passthrough=False, verbose=0) [source] Stack of estimators with a final regressor. Stacked generalization consists in stacking the output of individual estimator and use a regressor...
sklearn.modules.generated.sklearn.ensemble.stackingregressor
fit(X, y, sample_weight=None) [source] Fit the estimators. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vectors, where n_samples is the number of samples and n_features is the number of features. yarray-like of shape (n_samples,) Target values. sample_weightarray-like ...
sklearn.modules.generated.sklearn.ensemble.stackingregressor#sklearn.ensemble.StackingRegressor.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.ensemble.stackingregressor#sklearn.ensemble.StackingRegressor.fit_transform
get_params(deep=True) [source] Get the parameters of an estimator from the ensemble. Returns the parameters given in the constructor as well as the estimators contained within the estimators parameter. Parameters deepbool, default=True Setting it to True gets the various estimators and the parameters of the est...
sklearn.modules.generated.sklearn.ensemble.stackingregressor#sklearn.ensemble.StackingRegressor.get_params
property n_features_in_ Number of features seen during fit.
sklearn.modules.generated.sklearn.ensemble.stackingregressor#sklearn.ensemble.StackingRegressor.n_features_in_
predict(X, **predict_params) [source] Predict target for X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vectors, where n_samples is the number of samples and n_features is the number of features. **predict_paramsdict of str -> obj Parameters to the predict called by the...
sklearn.modules.generated.sklearn.ensemble.stackingregressor#sklearn.ensemble.StackingRegressor.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.ensemble.stackingregressor#sklearn.ensemble.StackingRegressor.score
set_params(**params) [source] Set the parameters of an estimator from the ensemble. Valid parameter keys can be listed with get_params(). Note that you can directly set the parameters of the estimators contained in estimators. Parameters **paramskeyword arguments Specific parameters using e.g. set_params(parame...
sklearn.modules.generated.sklearn.ensemble.stackingregressor#sklearn.ensemble.StackingRegressor.set_params
transform(X) [source] Return the predictions for X for each estimator. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vectors, where n_samples is the number of samples and n_features is the number of features. Returns y_predsndarray of shape (n_samples, n_estimators) P...
sklearn.modules.generated.sklearn.ensemble.stackingregressor#sklearn.ensemble.StackingRegressor.transform
class sklearn.ensemble.VotingClassifier(estimators, *, voting='hard', weights=None, n_jobs=None, flatten_transform=True, verbose=False) [source] Soft Voting/Majority Rule classifier for unfitted estimators. Read more in the User Guide. New in version 0.17. Parameters estimatorslist of (str, estimator) tuples ...
sklearn.modules.generated.sklearn.ensemble.votingclassifier#sklearn.ensemble.VotingClassifier
sklearn.ensemble.VotingClassifier class sklearn.ensemble.VotingClassifier(estimators, *, voting='hard', weights=None, n_jobs=None, flatten_transform=True, verbose=False) [source] Soft Voting/Majority Rule classifier for unfitted estimators. Read more in the User Guide. New in version 0.17. Parameters estimato...
sklearn.modules.generated.sklearn.ensemble.votingclassifier
fit(X, y, sample_weight=None) [source] Fit the estimators. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vectors, where n_samples is the number of samples and n_features is the number of features. yarray-like of shape (n_samples,) Target values. sample_weightarray-like ...
sklearn.modules.generated.sklearn.ensemble.votingclassifier#sklearn.ensemble.VotingClassifier.fit
fit_transform(X, y=None, **fit_params) [source] Return class labels or probabilities for each estimator. Return predictions for X for each estimator. Parameters X{array-like, sparse matrix, dataframe} of shape (n_samples, n_features) Input samples yndarray of shape (n_samples,), default=None Target values (...
sklearn.modules.generated.sklearn.ensemble.votingclassifier#sklearn.ensemble.VotingClassifier.fit_transform
get_params(deep=True) [source] Get the parameters of an estimator from the ensemble. Returns the parameters given in the constructor as well as the estimators contained within the estimators parameter. Parameters deepbool, default=True Setting it to True gets the various estimators and the parameters of the est...
sklearn.modules.generated.sklearn.ensemble.votingclassifier#sklearn.ensemble.VotingClassifier.get_params
predict(X) [source] Predict class labels for X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Returns majarray-like of shape (n_samples,) Predicted class labels.
sklearn.modules.generated.sklearn.ensemble.votingclassifier#sklearn.ensemble.VotingClassifier.predict
property predict_proba Compute probabilities of possible outcomes for samples in X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Returns avgarray-like of shape (n_samples, n_classes) Weighted average probability for each class per sample.
sklearn.modules.generated.sklearn.ensemble.votingclassifier#sklearn.ensemble.VotingClassifier.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.ensemble.votingclassifier#sklearn.ensemble.VotingClassifier.score
set_params(**params) [source] Set the parameters of an estimator from the ensemble. Valid parameter keys can be listed with get_params(). Note that you can directly set the parameters of the estimators contained in estimators. Parameters **paramskeyword arguments Specific parameters using e.g. set_params(parame...
sklearn.modules.generated.sklearn.ensemble.votingclassifier#sklearn.ensemble.VotingClassifier.set_params
transform(X) [source] Return class labels or probabilities for X for each estimator. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vectors, where n_samples is the number of samples and n_features is the number of features. Returns probabilities_or_labels If voting='so...
sklearn.modules.generated.sklearn.ensemble.votingclassifier#sklearn.ensemble.VotingClassifier.transform
class sklearn.ensemble.VotingRegressor(estimators, *, weights=None, n_jobs=None, verbose=False) [source] Prediction voting regressor for unfitted estimators. A voting regressor is an ensemble meta-estimator that fits several base regressors, each on the whole dataset. Then it averages the individual predictions to fo...
sklearn.modules.generated.sklearn.ensemble.votingregressor#sklearn.ensemble.VotingRegressor
sklearn.ensemble.VotingRegressor class sklearn.ensemble.VotingRegressor(estimators, *, weights=None, n_jobs=None, verbose=False) [source] Prediction voting regressor for unfitted estimators. A voting regressor is an ensemble meta-estimator that fits several base regressors, each on the whole dataset. Then it averag...
sklearn.modules.generated.sklearn.ensemble.votingregressor
fit(X, y, sample_weight=None) [source] Fit the estimators. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vectors, where n_samples is the number of samples and n_features is the number of features. yarray-like of shape (n_samples,) Target values. sample_weightarray-like ...
sklearn.modules.generated.sklearn.ensemble.votingregressor#sklearn.ensemble.VotingRegressor.fit
fit_transform(X, y=None, **fit_params) [source] Return class labels or probabilities for each estimator. Return predictions for X for each estimator. Parameters X{array-like, sparse matrix, dataframe} of shape (n_samples, n_features) Input samples yndarray of shape (n_samples,), default=None Target values (...
sklearn.modules.generated.sklearn.ensemble.votingregressor#sklearn.ensemble.VotingRegressor.fit_transform
get_params(deep=True) [source] Get the parameters of an estimator from the ensemble. Returns the parameters given in the constructor as well as the estimators contained within the estimators parameter. Parameters deepbool, default=True Setting it to True gets the various estimators and the parameters of the est...
sklearn.modules.generated.sklearn.ensemble.votingregressor#sklearn.ensemble.VotingRegressor.get_params
predict(X) [source] Predict regression target for X. The predicted regression target of an input sample is computed as the mean predicted regression targets of the estimators in the ensemble. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Returns yndarray of sh...
sklearn.modules.generated.sklearn.ensemble.votingregressor#sklearn.ensemble.VotingRegressor.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.ensemble.votingregressor#sklearn.ensemble.VotingRegressor.score
set_params(**params) [source] Set the parameters of an estimator from the ensemble. Valid parameter keys can be listed with get_params(). Note that you can directly set the parameters of the estimators contained in estimators. Parameters **paramskeyword arguments Specific parameters using e.g. set_params(parame...
sklearn.modules.generated.sklearn.ensemble.votingregressor#sklearn.ensemble.VotingRegressor.set_params
transform(X) [source] Return predictions for X for each estimator. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Returns predictions: ndarray of shape (n_samples, n_classifiers) Values predicted by each regressor.
sklearn.modules.generated.sklearn.ensemble.votingregressor#sklearn.ensemble.VotingRegressor.transform
class sklearn.exceptions.ConvergenceWarning [source] Custom warning to capture convergence problems Changed in version 0.18: Moved from sklearn.utils. Attributes args Methods with_traceback Exception.with_traceback(tb) – set self.__traceback__ to tb and return self. with_traceback() Exception.with_tra...
sklearn.modules.generated.sklearn.exceptions.convergencewarning#sklearn.exceptions.ConvergenceWarning
sklearn.exceptions.ConvergenceWarning class sklearn.exceptions.ConvergenceWarning [source] Custom warning to capture convergence problems Changed in version 0.18: Moved from sklearn.utils. Attributes args Methods with_traceback Exception.with_traceback(tb) – set self.__traceback__ to tb and return self. ...
sklearn.modules.generated.sklearn.exceptions.convergencewarning
with_traceback() Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
sklearn.modules.generated.sklearn.exceptions.convergencewarning#sklearn.exceptions.ConvergenceWarning.with_traceback
sklearn.exceptions.DataConversionWarning class sklearn.exceptions.DataConversionWarning [source] Warning used to notify implicit data conversions happening in the code. This warning occurs when some input data needs to be converted or interpreted in a way that may not match the user’s expectations. For example, th...
sklearn.modules.generated.sklearn.exceptions.dataconversionwarning
class sklearn.exceptions.DataConversionWarning [source] Warning used to notify implicit data conversions happening in the code. This warning occurs when some input data needs to be converted or interpreted in a way that may not match the user’s expectations. For example, this warning may occur when the user passes...
sklearn.modules.generated.sklearn.exceptions.dataconversionwarning#sklearn.exceptions.DataConversionWarning
with_traceback() Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
sklearn.modules.generated.sklearn.exceptions.dataconversionwarning#sklearn.exceptions.DataConversionWarning.with_traceback
sklearn.exceptions.DataDimensionalityWarning class sklearn.exceptions.DataDimensionalityWarning [source] Custom warning to notify potential issues with data dimensionality. For example, in random projection, this warning is raised when the number of components, which quantifies the dimensionality of the target proj...
sklearn.modules.generated.sklearn.exceptions.datadimensionalitywarning
class sklearn.exceptions.DataDimensionalityWarning [source] Custom warning to notify potential issues with data dimensionality. For example, in random projection, this warning is raised when the number of components, which quantifies the dimensionality of the target projection space, is higher than the number of feat...
sklearn.modules.generated.sklearn.exceptions.datadimensionalitywarning#sklearn.exceptions.DataDimensionalityWarning
with_traceback() Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
sklearn.modules.generated.sklearn.exceptions.datadimensionalitywarning#sklearn.exceptions.DataDimensionalityWarning.with_traceback
class sklearn.exceptions.EfficiencyWarning [source] Warning used to notify the user of inefficient computation. This warning notifies the user that the efficiency may not be optimal due to some reason which may be included as a part of the warning message. This may be subclassed into a more specific Warning class. N...
sklearn.modules.generated.sklearn.exceptions.efficiencywarning#sklearn.exceptions.EfficiencyWarning
sklearn.exceptions.EfficiencyWarning class sklearn.exceptions.EfficiencyWarning [source] Warning used to notify the user of inefficient computation. This warning notifies the user that the efficiency may not be optimal due to some reason which may be included as a part of the warning message. This may be subclassed...
sklearn.modules.generated.sklearn.exceptions.efficiencywarning
with_traceback() Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
sklearn.modules.generated.sklearn.exceptions.efficiencywarning#sklearn.exceptions.EfficiencyWarning.with_traceback
class sklearn.exceptions.FitFailedWarning [source] Warning class used if there is an error while fitting the estimator. This Warning is used in meta estimators GridSearchCV and RandomizedSearchCV and the cross-validation helper function cross_val_score to warn when there is an error while fitting the estimator. Chan...
sklearn.modules.generated.sklearn.exceptions.fitfailedwarning#sklearn.exceptions.FitFailedWarning
sklearn.exceptions.FitFailedWarning class sklearn.exceptions.FitFailedWarning [source] Warning class used if there is an error while fitting the estimator. This Warning is used in meta estimators GridSearchCV and RandomizedSearchCV and the cross-validation helper function cross_val_score to warn when there is an er...
sklearn.modules.generated.sklearn.exceptions.fitfailedwarning
with_traceback() Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
sklearn.modules.generated.sklearn.exceptions.fitfailedwarning#sklearn.exceptions.FitFailedWarning.with_traceback
sklearn.exceptions.NotFittedError class sklearn.exceptions.NotFittedError [source] Exception class to raise if estimator is used before fitting. This class inherits from both ValueError and AttributeError to help with exception handling and backward compatibility. Attributes args Examples >>> from sklearn.svm...
sklearn.modules.generated.sklearn.exceptions.notfittederror
class sklearn.exceptions.NotFittedError [source] Exception class to raise if estimator is used before fitting. This class inherits from both ValueError and AttributeError to help with exception handling and backward compatibility. Attributes args Examples >>> from sklearn.svm import LinearSVC >>> from sklearn.e...
sklearn.modules.generated.sklearn.exceptions.notfittederror#sklearn.exceptions.NotFittedError
with_traceback() Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
sklearn.modules.generated.sklearn.exceptions.notfittederror#sklearn.exceptions.NotFittedError.with_traceback
class sklearn.exceptions.UndefinedMetricWarning [source] Warning used when the metric is invalid Changed in version 0.18: Moved from sklearn.base. Attributes args Methods with_traceback Exception.with_traceback(tb) – set self.__traceback__ to tb and return self. with_traceback() Exception.with_traceba...
sklearn.modules.generated.sklearn.exceptions.undefinedmetricwarning#sklearn.exceptions.UndefinedMetricWarning
sklearn.exceptions.UndefinedMetricWarning class sklearn.exceptions.UndefinedMetricWarning [source] Warning used when the metric is invalid Changed in version 0.18: Moved from sklearn.base. Attributes args Methods with_traceback Exception.with_traceback(tb) – set self.__traceback__ to tb and return self. ...
sklearn.modules.generated.sklearn.exceptions.undefinedmetricwarning
with_traceback() Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
sklearn.modules.generated.sklearn.exceptions.undefinedmetricwarning#sklearn.exceptions.UndefinedMetricWarning.with_traceback
class sklearn.feature_extraction.DictVectorizer(*, dtype=<class 'numpy.float64'>, separator='=', sparse=True, sort=True) [source] Transforms lists of feature-value mappings to vectors. This transformer turns lists of mappings (dict-like objects) of feature names to feature values into Numpy arrays or scipy.sparse mat...
sklearn.modules.generated.sklearn.feature_extraction.dictvectorizer#sklearn.feature_extraction.DictVectorizer
sklearn.feature_extraction.DictVectorizer class sklearn.feature_extraction.DictVectorizer(*, dtype=<class 'numpy.float64'>, separator='=', sparse=True, sort=True) [source] Transforms lists of feature-value mappings to vectors. This transformer turns lists of mappings (dict-like objects) of feature names to feature ...
sklearn.modules.generated.sklearn.feature_extraction.dictvectorizer
fit(X, y=None) [source] Learn a list of feature name -> indices mappings. Parameters XMapping or iterable over Mappings Dict(s) or Mapping(s) from feature names (arbitrary Python objects) to feature values (strings or convertible to dtype). Changed in version 0.24: Accepts multiple string values for one catego...
sklearn.modules.generated.sklearn.feature_extraction.dictvectorizer#sklearn.feature_extraction.DictVectorizer.fit
fit_transform(X, y=None) [source] Learn a list of feature name -> indices mappings and transform X. Like fit(X) followed by transform(X), but does not require materializing X in memory. Parameters XMapping or iterable over Mappings Dict(s) or Mapping(s) from feature names (arbitrary Python objects) to feature v...
sklearn.modules.generated.sklearn.feature_extraction.dictvectorizer#sklearn.feature_extraction.DictVectorizer.fit_transform
get_feature_names() [source] Returns a list of feature names, ordered by their indices. If one-of-K coding is applied to categorical features, this will include the constructed feature names but not the original ones.
sklearn.modules.generated.sklearn.feature_extraction.dictvectorizer#sklearn.feature_extraction.DictVectorizer.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.feature_extraction.dictvectorizer#sklearn.feature_extraction.DictVectorizer.get_params
inverse_transform(X, dict_type=<class 'dict'>) [source] Transform array or sparse matrix X back to feature mappings. X must have been produced by this DictVectorizer’s transform or fit_transform method; it may only have passed through transformers that preserve the number of features and their order. In the case of o...
sklearn.modules.generated.sklearn.feature_extraction.dictvectorizer#sklearn.feature_extraction.DictVectorizer.inverse_transform
restrict(support, indices=False) [source] Restrict the features to those in support using feature selection. This function modifies the estimator in-place. Parameters supportarray-like Boolean mask or list of indices (as returned by the get_support member of feature selectors). indicesbool, default=False Wh...
sklearn.modules.generated.sklearn.feature_extraction.dictvectorizer#sklearn.feature_extraction.DictVectorizer.restrict
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_extraction.dictvectorizer#sklearn.feature_extraction.DictVectorizer.set_params
transform(X) [source] Transform feature->value dicts to array or sparse matrix. Named features not encountered during fit or fit_transform will be silently ignored. Parameters XMapping or iterable over Mappings of shape (n_samples,) Dict(s) or Mapping(s) from feature names (arbitrary Python objects) to feature ...
sklearn.modules.generated.sklearn.feature_extraction.dictvectorizer#sklearn.feature_extraction.DictVectorizer.transform
class sklearn.feature_extraction.FeatureHasher(n_features=1048576, *, input_type='dict', dtype=<class 'numpy.float64'>, alternate_sign=True) [source] Implements feature hashing, aka the hashing trick. This class turns sequences of symbolic feature names (strings) into scipy.sparse matrices, using a hash function to c...
sklearn.modules.generated.sklearn.feature_extraction.featurehasher#sklearn.feature_extraction.FeatureHasher
sklearn.feature_extraction.FeatureHasher class sklearn.feature_extraction.FeatureHasher(n_features=1048576, *, input_type='dict', dtype=<class 'numpy.float64'>, alternate_sign=True) [source] Implements feature hashing, aka the hashing trick. This class turns sequences of symbolic feature names (strings) into scipy....
sklearn.modules.generated.sklearn.feature_extraction.featurehasher
fit(X=None, y=None) [source] No-op. This method doesn’t do anything. It exists purely for compatibility with the scikit-learn transformer API. Parameters Xndarray Returns selfFeatureHasher
sklearn.modules.generated.sklearn.feature_extraction.featurehasher#sklearn.feature_extraction.FeatureHasher.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_extraction.featurehasher#sklearn.feature_extraction.FeatureHasher.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_extraction.featurehasher#sklearn.feature_extraction.FeatureHasher.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.feature_extraction.featurehasher#sklearn.feature_extraction.FeatureHasher.set_params
transform(raw_X) [source] Transform a sequence of instances to a scipy.sparse matrix. Parameters raw_Xiterable over iterable over raw features, length = n_samples Samples. Each sample must be iterable an (e.g., a list or tuple) containing/generating feature names (and optionally values, see the input_type const...
sklearn.modules.generated.sklearn.feature_extraction.featurehasher#sklearn.feature_extraction.FeatureHasher.transform
sklearn.feature_extraction.image.extract_patches_2d(image, patch_size, *, max_patches=None, random_state=None) [source] Reshape a 2D image into a collection of patches The resulting patches are allocated in a dedicated array. Read more in the User Guide. Parameters imagendarray of shape (image_height, image_width...
sklearn.modules.generated.sklearn.feature_extraction.image.extract_patches_2d#sklearn.feature_extraction.image.extract_patches_2d
sklearn.feature_extraction.image.grid_to_graph(n_x, n_y, n_z=1, *, mask=None, return_as=<class 'scipy.sparse.coo.coo_matrix'>, dtype=<class 'int'>) [source] Graph of the pixel-to-pixel connections Edges exist if 2 voxels are connected. Parameters n_xint Dimension in x axis n_yint Dimension in y axis n_zin...
sklearn.modules.generated.sklearn.feature_extraction.image.grid_to_graph#sklearn.feature_extraction.image.grid_to_graph
sklearn.feature_extraction.image.img_to_graph(img, *, mask=None, return_as=<class 'scipy.sparse.coo.coo_matrix'>, dtype=None) [source] Graph of the pixel-to-pixel gradient connections Edges are weighted with the gradient values. Read more in the User Guide. Parameters imgndarray of shape (height, width) or (heigh...
sklearn.modules.generated.sklearn.feature_extraction.image.img_to_graph#sklearn.feature_extraction.image.img_to_graph
class sklearn.feature_extraction.image.PatchExtractor(*, patch_size=None, max_patches=None, random_state=None) [source] Extracts patches from a collection of images Read more in the User Guide. New in version 0.9. Parameters patch_sizetuple of int (patch_height, patch_width), default=None The dimensions of on...
sklearn.modules.generated.sklearn.feature_extraction.image.patchextractor#sklearn.feature_extraction.image.PatchExtractor
sklearn.feature_extraction.image.PatchExtractor class sklearn.feature_extraction.image.PatchExtractor(*, patch_size=None, max_patches=None, random_state=None) [source] Extracts patches from a collection of images Read more in the User Guide. New in version 0.9. Parameters patch_sizetuple of int (patch_height,...
sklearn.modules.generated.sklearn.feature_extraction.image.patchextractor
fit(X, y=None) [source] Do nothing and return the estimator unchanged. This method is just there to implement the usual API and hence work in pipelines. Parameters Xarray-like of shape (n_samples, n_features) Training data.
sklearn.modules.generated.sklearn.feature_extraction.image.patchextractor#sklearn.feature_extraction.image.PatchExtractor.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.feature_extraction.image.patchextractor#sklearn.feature_extraction.image.PatchExtractor.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.feature_extraction.image.patchextractor#sklearn.feature_extraction.image.PatchExtractor.set_params
transform(X) [source] Transforms the image samples in X into a matrix of patch data. Parameters Xndarray of shape (n_samples, image_height, image_width) or (n_samples, image_height, image_width, n_channels) Array of images from which to extract patches. For color images, the last dimension specifies the channel...
sklearn.modules.generated.sklearn.feature_extraction.image.patchextractor#sklearn.feature_extraction.image.PatchExtractor.transform
sklearn.feature_extraction.image.reconstruct_from_patches_2d(patches, image_size) [source] Reconstruct the image from all of its patches. Patches are assumed to overlap and the image is constructed by filling in the patches from left to right, top to bottom, averaging the overlapping regions. Read more in the User Gu...
sklearn.modules.generated.sklearn.feature_extraction.image.reconstruct_from_patches_2d#sklearn.feature_extraction.image.reconstruct_from_patches_2d
class sklearn.feature_extraction.text.CountVectorizer(*, input='content', encoding='utf-8', decode_error='strict', strip_accents=None, lowercase=True, preprocessor=None, tokenizer=None, stop_words=None, token_pattern='(?u)\\b\\w\\w+\\b', ngram_range=(1, 1), analyzer='word', max_df=1.0, min_df=1, max_features=None, voca...
sklearn.modules.generated.sklearn.feature_extraction.text.countvectorizer#sklearn.feature_extraction.text.CountVectorizer
sklearn.feature_extraction.text.CountVectorizer class sklearn.feature_extraction.text.CountVectorizer(*, input='content', encoding='utf-8', decode_error='strict', strip_accents=None, lowercase=True, preprocessor=None, tokenizer=None, stop_words=None, token_pattern='(?u)\\b\\w\\w+\\b', ngram_range=(1, 1), analyzer='wo...
sklearn.modules.generated.sklearn.feature_extraction.text.countvectorizer
build_analyzer() [source] Return a callable that handles preprocessing, tokenization and n-grams generation. Returns analyzer: callable A function to handle preprocessing, tokenization and n-grams generation.
sklearn.modules.generated.sklearn.feature_extraction.text.countvectorizer#sklearn.feature_extraction.text.CountVectorizer.build_analyzer
build_preprocessor() [source] Return a function to preprocess the text before tokenization. Returns preprocessor: callable A function to preprocess the text before tokenization.
sklearn.modules.generated.sklearn.feature_extraction.text.countvectorizer#sklearn.feature_extraction.text.CountVectorizer.build_preprocessor
build_tokenizer() [source] Return a function that splits a string into a sequence of tokens. Returns tokenizer: callable A function to split a string into a sequence of tokens.
sklearn.modules.generated.sklearn.feature_extraction.text.countvectorizer#sklearn.feature_extraction.text.CountVectorizer.build_tokenizer
decode(doc) [source] Decode the input into a string of unicode symbols. The decoding strategy depends on the vectorizer parameters. Parameters docstr The string to decode. Returns doc: str A string of unicode symbols.
sklearn.modules.generated.sklearn.feature_extraction.text.countvectorizer#sklearn.feature_extraction.text.CountVectorizer.decode
fit(raw_documents, y=None) [source] Learn a vocabulary dictionary of all tokens in the raw documents. Parameters raw_documentsiterable An iterable which yields either str, unicode or file objects. Returns self
sklearn.modules.generated.sklearn.feature_extraction.text.countvectorizer#sklearn.feature_extraction.text.CountVectorizer.fit
fit_transform(raw_documents, y=None) [source] Learn the vocabulary dictionary and return document-term matrix. This is equivalent to fit followed by transform, but more efficiently implemented. Parameters raw_documentsiterable An iterable which yields either str, unicode or file objects. Returns Xarray of...
sklearn.modules.generated.sklearn.feature_extraction.text.countvectorizer#sklearn.feature_extraction.text.CountVectorizer.fit_transform
get_feature_names() [source] Array mapping from feature integer indices to feature name. Returns feature_nameslist A list of feature names.
sklearn.modules.generated.sklearn.feature_extraction.text.countvectorizer#sklearn.feature_extraction.text.CountVectorizer.get_feature_names