8.8.10. sklearn.feature_selection.f_regression¶
- sklearn.feature_selection.f_regression(X, y, center=True)¶
Univariate linear regression tests
Quick linear model for testing the effect of a single regressor, sequentially for many regressors.
This is done in 3 steps: 1. the regressor of interest and the data are orthogonalized wrt constant regressors 2. the cross correlation between data and regressors is computed 3. it is converted to an F score then to a p-value
Parameters : X : array of shape (n_samples, n_features)
the set of regressors sthat will tested sequentially
y : array of shape(n_samples)
the data matrix
center : True, bool,
If true, X and y are centered
Returns : F : array of shape (m),
the set of F values
pval : array of shape(m)
the set of p-values