doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
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.text.countvectorizer#sklearn.feature_extraction.text.CountVectorizer.get_params
get_stop_words() [source] Build or fetch the effective stop words list. Returns stop_words: list or None A list of stop words.
sklearn.modules.generated.sklearn.feature_extraction.text.countvectorizer#sklearn.feature_extraction.text.CountVectorizer.get_stop_words
inverse_transform(X) [source] Return terms per document with nonzero entries in X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Document-term matrix. Returns X_invlist of arrays of shape (n_samples,) List of arrays of terms.
sklearn.modules.generated.sklearn.feature_extraction.text.countvectorizer#sklearn.feature_extraction.text.CountVectorizer.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_extraction.text.countvectorizer#sklearn.feature_extraction.text.CountVectorizer.set_params
transform(raw_documents) [source] Transform documents to document-term matrix. Extract token counts out of raw text documents using the vocabulary fitted with fit or the one provided to the constructor. Parameters raw_documentsiterable An iterable which yields either str, unicode or file objects. Returns ...
sklearn.modules.generated.sklearn.feature_extraction.text.countvectorizer#sklearn.feature_extraction.text.CountVectorizer.transform
class sklearn.feature_extraction.text.HashingVectorizer(*, 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', n_features=1048576, binary=False, norm='l2'...
sklearn.modules.generated.sklearn.feature_extraction.text.hashingvectorizer#sklearn.feature_extraction.text.HashingVectorizer
sklearn.feature_extraction.text.HashingVectorizer class sklearn.feature_extraction.text.HashingVectorizer(*, 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...
sklearn.modules.generated.sklearn.feature_extraction.text.hashingvectorizer
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.hashingvectorizer#sklearn.feature_extraction.text.HashingVectorizer.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.hashingvectorizer#sklearn.feature_extraction.text.HashingVectorizer.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.hashingvectorizer#sklearn.feature_extraction.text.HashingVectorizer.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.hashingvectorizer#sklearn.feature_extraction.text.HashingVectorizer.decode
fit(X, y=None) [source] Does nothing: this transformer is stateless. Parameters Xndarray of shape [n_samples, n_features] Training data.
sklearn.modules.generated.sklearn.feature_extraction.text.hashingvectorizer#sklearn.feature_extraction.text.HashingVectorizer.fit
fit_transform(X, y=None) [source] Transform a sequence of documents to a document-term matrix. Parameters Xiterable over raw text documents, length = n_samples Samples. Each sample must be a text document (either bytes or unicode strings, file name or file object depending on the constructor argument) which wil...
sklearn.modules.generated.sklearn.feature_extraction.text.hashingvectorizer#sklearn.feature_extraction.text.HashingVectorizer.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.text.hashingvectorizer#sklearn.feature_extraction.text.HashingVectorizer.get_params
get_stop_words() [source] Build or fetch the effective stop words list. Returns stop_words: list or None A list of stop words.
sklearn.modules.generated.sklearn.feature_extraction.text.hashingvectorizer#sklearn.feature_extraction.text.HashingVectorizer.get_stop_words
partial_fit(X, y=None) [source] Does nothing: this transformer is stateless. This method is just there to mark the fact that this transformer can work in a streaming setup. Parameters Xndarray of shape [n_samples, n_features] Training data.
sklearn.modules.generated.sklearn.feature_extraction.text.hashingvectorizer#sklearn.feature_extraction.text.HashingVectorizer.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_extraction.text.hashingvectorizer#sklearn.feature_extraction.text.HashingVectorizer.set_params
transform(X) [source] Transform a sequence of documents to a document-term matrix. Parameters Xiterable over raw text documents, length = n_samples Samples. Each sample must be a text document (either bytes or unicode strings, file name or file object depending on the constructor argument) which will be tokeniz...
sklearn.modules.generated.sklearn.feature_extraction.text.hashingvectorizer#sklearn.feature_extraction.text.HashingVectorizer.transform
class sklearn.feature_extraction.text.TfidfTransformer(*, norm='l2', use_idf=True, smooth_idf=True, sublinear_tf=False) [source] Transform a count matrix to a normalized tf or tf-idf representation Tf means term-frequency while tf-idf means term-frequency times inverse document-frequency. This is a common term weight...
sklearn.modules.generated.sklearn.feature_extraction.text.tfidftransformer#sklearn.feature_extraction.text.TfidfTransformer
sklearn.feature_extraction.text.TfidfTransformer class sklearn.feature_extraction.text.TfidfTransformer(*, norm='l2', use_idf=True, smooth_idf=True, sublinear_tf=False) [source] Transform a count matrix to a normalized tf or tf-idf representation Tf means term-frequency while tf-idf means term-frequency times inver...
sklearn.modules.generated.sklearn.feature_extraction.text.tfidftransformer
fit(X, y=None) [source] Learn the idf vector (global term weights). Parameters Xsparse matrix of shape n_samples, n_features) A matrix of term/token counts.
sklearn.modules.generated.sklearn.feature_extraction.text.tfidftransformer#sklearn.feature_extraction.text.TfidfTransformer.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.text.tfidftransformer#sklearn.feature_extraction.text.TfidfTransformer.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.text.tfidftransformer#sklearn.feature_extraction.text.TfidfTransformer.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.text.tfidftransformer#sklearn.feature_extraction.text.TfidfTransformer.set_params
transform(X, copy=True) [source] Transform a count matrix to a tf or tf-idf representation Parameters Xsparse matrix of (n_samples, n_features) a matrix of term/token counts copybool, default=True Whether to copy X and operate on the copy or perform in-place operations. Returns vectorssparse matrix of...
sklearn.modules.generated.sklearn.feature_extraction.text.tfidftransformer#sklearn.feature_extraction.text.TfidfTransformer.transform
class sklearn.feature_extraction.text.TfidfVectorizer(*, input='content', encoding='utf-8', decode_error='strict', strip_accents=None, lowercase=True, preprocessor=None, tokenizer=None, analyzer='word', stop_words=None, token_pattern='(?u)\\b\\w\\w+\\b', ngram_range=(1, 1), max_df=1.0, min_df=1, max_features=None, voca...
sklearn.modules.generated.sklearn.feature_extraction.text.tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer
sklearn.feature_extraction.text.TfidfVectorizer class sklearn.feature_extraction.text.TfidfVectorizer(*, input='content', encoding='utf-8', decode_error='strict', strip_accents=None, lowercase=True, preprocessor=None, tokenizer=None, analyzer='word', stop_words=None, token_pattern='(?u)\\b\\w\\w+\\b', ngram_range=(1,...
sklearn.modules.generated.sklearn.feature_extraction.text.tfidfvectorizer
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.tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer.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.tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer.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.tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer.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.tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer.decode
fit(raw_documents, y=None) [source] Learn vocabulary and idf from training set. Parameters raw_documentsiterable An iterable which yields either str, unicode or file objects. yNone This parameter is not needed to compute tfidf. Returns selfobject Fitted vectorizer.
sklearn.modules.generated.sklearn.feature_extraction.text.tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer.fit
fit_transform(raw_documents, y=None) [source] Learn vocabulary and idf, 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. yNone This parameter is ignor...
sklearn.modules.generated.sklearn.feature_extraction.text.tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer.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.tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer.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.text.tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer.get_params
get_stop_words() [source] Build or fetch the effective stop words list. Returns stop_words: list or None A list of stop words.
sklearn.modules.generated.sklearn.feature_extraction.text.tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer.get_stop_words
inverse_transform(X) [source] Return terms per document with nonzero entries in X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Document-term matrix. Returns X_invlist of arrays of shape (n_samples,) List of arrays of terms.
sklearn.modules.generated.sklearn.feature_extraction.text.tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer.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_extraction.text.tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer.set_params
transform(raw_documents) [source] Transform documents to document-term matrix. Uses the vocabulary and document frequencies (df) learned by fit (or fit_transform). Parameters raw_documentsiterable An iterable which yields either str, unicode or file objects. Returns Xsparse matrix of (n_samples, n_feature...
sklearn.modules.generated.sklearn.feature_extraction.text.tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer.transform
sklearn.feature_selection.chi2(X, y) [source] Compute chi-squared stats between each non-negative feature and class. This score can be used to select the n_features features with the highest values for the test chi-squared statistic from X, which must contain only non-negative features such as booleans or frequencies...
sklearn.modules.generated.sklearn.feature_selection.chi2#sklearn.feature_selection.chi2
sklearn.feature_selection.f_classif(X, y) [source] Compute the ANOVA F-value for the provided sample. Read more in the User Guide. Parameters X{array-like, sparse matrix} shape = [n_samples, n_features] The set of regressors that will be tested sequentially. yarray of shape(n_samples) The data matrix. Re...
sklearn.modules.generated.sklearn.feature_selection.f_classif#sklearn.feature_selection.f_classif
sklearn.feature_selection.f_regression(X, y, *, center=True) [source] Univariate linear regression tests. Linear model for testing the individual effect of each of many regressors. This is a scoring function to be used in a feature selection procedure, not a free standing feature selection procedure. This is done in ...
sklearn.modules.generated.sklearn.feature_selection.f_regression#sklearn.feature_selection.f_regression
class sklearn.feature_selection.GenericUnivariateSelect(score_func=<function f_classif>, *, mode='percentile', param=1e-05) [source] Univariate feature selector with configurable strategy. Read more in the User Guide. Parameters score_funccallable, default=f_classif Function taking two arrays X and y, and retur...
sklearn.modules.generated.sklearn.feature_selection.genericunivariateselect#sklearn.feature_selection.GenericUnivariateSelect
sklearn.feature_selection.GenericUnivariateSelect class sklearn.feature_selection.GenericUnivariateSelect(score_func=<function f_classif>, *, mode='percentile', param=1e-05) [source] Univariate feature selector with configurable strategy. Read more in the User Guide. Parameters score_funccallable, default=f_cla...
sklearn.modules.generated.sklearn.feature_selection.genericunivariateselect
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.genericunivariateselect#sklearn.feature_selection.GenericUnivariateSelect.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.genericunivariateselect#sklearn.feature_selection.GenericUnivariateSelect.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.genericunivariateselect#sklearn.feature_selection.GenericUnivariateSelect.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.genericunivariateselect#sklearn.feature_selection.GenericUnivariateSelect.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.genericunivariateselect#sklearn.feature_selection.GenericUnivariateSelect.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.genericunivariateselect#sklearn.feature_selection.GenericUnivariateSelect.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.genericunivariateselect#sklearn.feature_selection.GenericUnivariateSelect.transform
sklearn.feature_selection.mutual_info_classif(X, y, *, discrete_features='auto', n_neighbors=3, copy=True, random_state=None) [source] Estimate mutual information for a discrete target variable. Mutual information (MI) [1] between two random variables is a non-negative value, which measures the dependency between the...
sklearn.modules.generated.sklearn.feature_selection.mutual_info_classif#sklearn.feature_selection.mutual_info_classif
sklearn.feature_selection.mutual_info_regression(X, y, *, discrete_features='auto', n_neighbors=3, copy=True, random_state=None) [source] Estimate mutual information for a continuous target variable. Mutual information (MI) [1] between two random variables is a non-negative value, which measures the dependency betwee...
sklearn.modules.generated.sklearn.feature_selection.mutual_info_regression#sklearn.feature_selection.mutual_info_regression
class sklearn.feature_selection.RFE(estimator, *, n_features_to_select=None, step=1, verbose=0, importance_getter='auto') [source] Feature ranking with recursive feature elimination. Given an external estimator that assigns weights to features (e.g., the coefficients of a linear model), the goal of recursive feature ...
sklearn.modules.generated.sklearn.feature_selection.rfe#sklearn.feature_selection.RFE
sklearn.feature_selection.RFE class sklearn.feature_selection.RFE(estimator, *, n_features_to_select=None, step=1, verbose=0, importance_getter='auto') [source] Feature ranking with recursive feature elimination. Given an external estimator that assigns weights to features (e.g., the coefficients of a linear model)...
sklearn.modules.generated.sklearn.feature_selection.rfe
decision_function(X) [source] Compute the decision function of X. Parameters X{array-like or sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a sparse csr_matrix. Returns scorearray, shape = [n_sam...
sklearn.modules.generated.sklearn.feature_selection.rfe#sklearn.feature_selection.RFE.decision_function
fit(X, y) [source] Fit the RFE model and then the underlying estimator on the selected features. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. yarray-like of shape (n_samples,) The target values.
sklearn.modules.generated.sklearn.feature_selection.rfe#sklearn.feature_selection.RFE.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.rfe#sklearn.feature_selection.RFE.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.rfe#sklearn.feature_selection.RFE.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.rfe#sklearn.feature_selection.RFE.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.rfe#sklearn.feature_selection.RFE.inverse_transform
predict(X) [source] Reduce X to the selected features and then predict using the underlying estimator. Parameters Xarray of shape [n_samples, n_features] The input samples. Returns yarray of shape [n_samples] The predicted target values.
sklearn.modules.generated.sklearn.feature_selection.rfe#sklearn.feature_selection.RFE.predict
predict_log_proba(X) [source] Predict class log-probabilities for X. Parameters Xarray of shape [n_samples, n_features] The input samples. Returns parray of shape (n_samples, n_classes) The class log-probabilities of the input samples. The order of the classes corresponds to that in the attribute classe...
sklearn.modules.generated.sklearn.feature_selection.rfe#sklearn.feature_selection.RFE.predict_log_proba
predict_proba(X) [source] Predict class probabilities for X. Parameters X{array-like or sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a sparse csr_matrix. Returns parray of shape (n_samples, n_c...
sklearn.modules.generated.sklearn.feature_selection.rfe#sklearn.feature_selection.RFE.predict_proba
score(X, y) [source] Reduce X to the selected features and then return the score of the underlying estimator. Parameters Xarray of shape [n_samples, n_features] The input samples. yarray of shape [n_samples] The target values.
sklearn.modules.generated.sklearn.feature_selection.rfe#sklearn.feature_selection.RFE.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.feature_selection.rfe#sklearn.feature_selection.RFE.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.rfe#sklearn.feature_selection.RFE.transform
class sklearn.feature_selection.RFECV(estimator, *, step=1, min_features_to_select=1, cv=None, scoring=None, verbose=0, n_jobs=None, importance_getter='auto') [source] Feature ranking with recursive feature elimination and cross-validated selection of the best number of features. See glossary entry for cross-validati...
sklearn.modules.generated.sklearn.feature_selection.rfecv#sklearn.feature_selection.RFECV
sklearn.feature_selection.RFECV class sklearn.feature_selection.RFECV(estimator, *, step=1, min_features_to_select=1, cv=None, scoring=None, verbose=0, n_jobs=None, importance_getter='auto') [source] Feature ranking with recursive feature elimination and cross-validated selection of the best number of features. See...
sklearn.modules.generated.sklearn.feature_selection.rfecv
decision_function(X) [source] Compute the decision function of X. Parameters X{array-like or sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a sparse csr_matrix. Returns scorearray, shape = [n_sam...
sklearn.modules.generated.sklearn.feature_selection.rfecv#sklearn.feature_selection.RFECV.decision_function
fit(X, y, groups=None) [source] Fit the RFE model and automatically tune the number of selected features. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vector, where n_samples is the number of samples and n_features is the total number of features. yarray-like of shape ...
sklearn.modules.generated.sklearn.feature_selection.rfecv#sklearn.feature_selection.RFECV.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.rfecv#sklearn.feature_selection.RFECV.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.rfecv#sklearn.feature_selection.RFECV.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.rfecv#sklearn.feature_selection.RFECV.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.rfecv#sklearn.feature_selection.RFECV.inverse_transform
predict(X) [source] Reduce X to the selected features and then predict using the underlying estimator. Parameters Xarray of shape [n_samples, n_features] The input samples. Returns yarray of shape [n_samples] The predicted target values.
sklearn.modules.generated.sklearn.feature_selection.rfecv#sklearn.feature_selection.RFECV.predict
predict_log_proba(X) [source] Predict class log-probabilities for X. Parameters Xarray of shape [n_samples, n_features] The input samples. Returns parray of shape (n_samples, n_classes) The class log-probabilities of the input samples. The order of the classes corresponds to that in the attribute classe...
sklearn.modules.generated.sklearn.feature_selection.rfecv#sklearn.feature_selection.RFECV.predict_log_proba
predict_proba(X) [source] Predict class probabilities for X. Parameters X{array-like or sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a sparse csr_matrix. Returns parray of shape (n_samples, n_c...
sklearn.modules.generated.sklearn.feature_selection.rfecv#sklearn.feature_selection.RFECV.predict_proba
score(X, y) [source] Reduce X to the selected features and then return the score of the underlying estimator. Parameters Xarray of shape [n_samples, n_features] The input samples. yarray of shape [n_samples] The target values.
sklearn.modules.generated.sklearn.feature_selection.rfecv#sklearn.feature_selection.RFECV.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.feature_selection.rfecv#sklearn.feature_selection.RFECV.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.rfecv#sklearn.feature_selection.RFECV.transform
class sklearn.feature_selection.SelectFdr(score_func=<function f_classif>, *, alpha=0.05) [source] Filter: Select the p-values for an estimated false discovery rate This uses the Benjamini-Hochberg procedure. alpha is an upper bound on the expected false discovery rate. Read more in the User Guide. Parameters sco...
sklearn.modules.generated.sklearn.feature_selection.selectfdr#sklearn.feature_selection.SelectFdr
sklearn.feature_selection.SelectFdr class sklearn.feature_selection.SelectFdr(score_func=<function f_classif>, *, alpha=0.05) [source] Filter: Select the p-values for an estimated false discovery rate This uses the Benjamini-Hochberg procedure. alpha is an upper bound on the expected false discovery rate. Read more...
sklearn.modules.generated.sklearn.feature_selection.selectfdr
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.selectfdr#sklearn.feature_selection.SelectFdr.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.selectfdr#sklearn.feature_selection.SelectFdr.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.selectfdr#sklearn.feature_selection.SelectFdr.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.selectfdr#sklearn.feature_selection.SelectFdr.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.selectfdr#sklearn.feature_selection.SelectFdr.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.selectfdr#sklearn.feature_selection.SelectFdr.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.selectfdr#sklearn.feature_selection.SelectFdr.transform
class sklearn.feature_selection.SelectFpr(score_func=<function f_classif>, *, alpha=0.05) [source] Filter: Select the pvalues below alpha based on a FPR test. FPR test stands for False Positive Rate test. It controls the total amount of false detections. Read more in the User Guide. Parameters score_funccallable,...
sklearn.modules.generated.sklearn.feature_selection.selectfpr#sklearn.feature_selection.SelectFpr
sklearn.feature_selection.SelectFpr class sklearn.feature_selection.SelectFpr(score_func=<function f_classif>, *, alpha=0.05) [source] Filter: Select the pvalues below alpha based on a FPR test. FPR test stands for False Positive Rate test. It controls the total amount of false detections. Read more in the User Gui...
sklearn.modules.generated.sklearn.feature_selection.selectfpr
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.selectfpr#sklearn.feature_selection.SelectFpr.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.selectfpr#sklearn.feature_selection.SelectFpr.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.selectfpr#sklearn.feature_selection.SelectFpr.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.selectfpr#sklearn.feature_selection.SelectFpr.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.selectfpr#sklearn.feature_selection.SelectFpr.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.selectfpr#sklearn.feature_selection.SelectFpr.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.selectfpr#sklearn.feature_selection.SelectFpr.transform
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 Guide. Parameters estimatorobject The ...
sklearn.modules.generated.sklearn.feature_selection.selectfrommodel#sklearn.feature_selection.SelectFromModel