skbold.feature_selection.filters module¶
-
class
GenericUnivariateSelect
(score_func=<function f_classif>, mode='percentile', param=1e-05)[source]¶ Bases:
sklearn.feature_selection.univariate_selection._BaseFilter
Univariate feature selector with configurable strategy.
Updated version from scikit-learn: http://scikit-learn.org/`.
Parameters: - score_func (callable) – Function taking two arrays X and y, and returning a pair of arrays (scores, pvalues). For modes ‘percentile’ or ‘kbest’ it can return a single array scores.
- mode ({'percentile', 'k_best', 'fpr', 'fdr', 'fwe', 'cutoff'}) – Feature selection mode.
- param (float or int depending on the feature selection mode) – Parameter of the corresponding mode.
Variables: - 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 scores only.
-
class
SelectAboveCutoff
(cutoff, score_func=<function f_classif>)[source]¶ Bases:
sklearn.feature_selection.univariate_selection._BaseFilter
Filter: Select features with a score above some cutoff.
Parameters: - cutoff (int/float) – Cutoff for feature-scores to be selected.
- score_func (callable) – Function that takes a 2D array X (samples x features) and returns a score reflecting a univariate difference (higher is better).