Scikit-learn (Python): what does f_regression () calculate?

I am trying to understand what f_regression () does in a function select package. ( http://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.f_regression.html#sklearn.feature_selection.f_regression )

According to the documentation, the first step in f_regression is as follows:

"1. the regressor of interest and the data are orthogonalized wrt constant regressors." 

What does this line mean? What are these constant regressors?

Thanks!

+6
source share
1 answer

This means that the average is subtracted for both variables.

A permanent regressor is a vector full of them. What this vector can explain in your data is then subtracted. This results in a zero sum vector, i.e. Centered variable.

What f1_regression essentially calculates is a correlation, a scalar product between centered and appropriately changed values โ€‹โ€‹of variables.

The result obtained is a function of this value and degrees of freedom, that is, the dimension of the vectors. The higher the score, the more likely the variables are.

+6
source

Source: https://habr.com/ru/post/972464/


All Articles