ielearn.predict.feature_selection module¶
-
class
ielearn.predict.feature_selection.
SelectThreshold
(score_func=<function f_classif>, thresh=0.1)[source]¶ Bases:
sklearn.feature_selection.univariate_selection._BaseFilter
Select features according to the threshold.
Read more in the User Guide.
- score_func : callable
- Function taking two arrays X and y, and returning a pair of arrays (scores, pvalues) or a single array with scores. Default is f_classif (see below “See also”). The default function only works with classification tasks.
- thresh : int or “none”, optional, default=0.1
- Score threshold for feature inclusion. The “none” option bypasses selection, for use in a parameter search.
- scores_ : array-like, shape=(n_features,)
- Scores of features.
- pvalues_ : array-like, shape=(n_features,)
- p-values of feature scores, None if score_func returned only scores.
Ties between features with equal scores will be broken in an unspecified way.
f_classif: ANOVA F-value between label/feature for classification tasks. mutual_info_classif: Mutual information for a discrete target. chi2: Chi-squared stats of non-negative features for classification tasks. f_regression: F-value between label/feature for regression tasks. mutual_info_regression: Mutual information for a continuous target. SelectPercentile: Select features based on percentile of the highest scores. SelectFpr: Select features based on a false positive rate test. SelectFdr: Select features based on an estimated false discovery rate. SelectFwe: Select features based on family-wise error rate. GenericUnivariateSelect: Univariate feature selector with configurable mode.