class sklearn.feature_selection.GenericUnivariateSelect(score_func=<function f_classif>, mode=’percentile’, param=1e05)
[source]
Univariate feature selector with configurable strategy.
Read more in the User Guide.
Parameters: 


Attributes: 

See also
f_classif
mutual_info_classif
chi2
f_regression
mutual_info_regression
SelectPercentile
SelectKBest
SelectFpr
SelectFdr
SelectFwe
>>> from sklearn.datasets import load_breast_cancer >>> from sklearn.feature_selection import GenericUnivariateSelect, chi2 >>> X, y = load_breast_cancer(return_X_y=True) >>> X.shape (569, 30) >>> transformer = GenericUnivariateSelect(chi2, 'k_best', param=20) >>> X_new = transformer.fit_transform(X, y) >>> X_new.shape (569, 20)
fit (X, y)  Run score function on (X, y) and get the appropriate features. 
fit_transform (X[, y])  Fit to data, then transform it. 
get_params ([deep])  Get parameters for this estimator. 
get_support ([indices])  Get a mask, or integer index, of the features selected 
inverse_transform (X)  Reverse the transformation operation 
set_params (**params)  Set the parameters of this estimator. 
transform (X)  Reduce X to the selected features. 
__init__(score_func=<function f_classif>, mode=’percentile’, param=1e05)
[source]
fit(X, y)
[source]
Run score function on (X, y) and get the appropriate features.
Parameters: 


Returns: 

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: 


Returns: 

get_params(deep=True)
[source]
Get parameters for this estimator.
Parameters: 


Returns: 

get_support(indices=False)
[source]
Get a mask, or integer index, of the features selected
Parameters: 


Returns: 

inverse_transform(X)
[source]
Reverse the transformation operation
Parameters: 


Returns: 

set_params(**params)
[source]
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form <component>__<parameter>
so that it’s possible to update each component of a nested object.
Returns: 


transform(X)
[source]
Reduce X to the selected features.
Parameters: 


Returns: 

© 2007–2018 The scikitlearn developers
Licensed under the 3clause BSD License.
http://scikitlearn.org/stable/modules/generated/sklearn.feature_selection.GenericUnivariateSelect.html