Expand description
Feature scoring functions for feature selection.
This module provides standalone univariate scoring functions that compute per-feature statistics and p-values:
f_classifโ ANOVA F-statistic for classification.f_regressionโ univariate F-statistic via Pearson correlation.chi2โ chi-squared statistic for non-negative features.
These functions return (F-statistics, p-values) tuples and can be used
directly or passed to SelectKBest
/ SelectPercentile via the
ScoreFunc enum.
Functionsยง
- chi2
- Compute chi-squared statistics between each non-negative feature and the class labels.
- compute_
scores_ classif - Add
FRegressionandChi2variants toScoreFunc. - compute_
scores_ regression - Compute regression scores, returning F-statistics only.
- f_
classif - Compute the ANOVA F-statistic and approximate p-values for each feature.
- f_
regression - Compute univariate F-statistics via Pearson correlation for regression.