DOC Clarifies formula in f_regression's docstring
@@ -249,7 +249,9 @@ def r_regression(X, y, *, center=True, force_finite=True):
a free standing feature selection procedure.
The cross correlation between each regressor and the target is computed
- as ((X[:, i] - mean(X[:, i])) * (y - mean_y)) / (std(X[:, i]) * std(y)).
+ as::
+
+ E[(X[:, i] - mean(X[:, i])) * (y - mean(y))] / (std(X[:, i]) * std(y))
For more on usage see the :ref:`User Guide <univariate_feature_selection>`.
@@ -328,9 +330,11 @@ def f_regression(X, y, *, center=True, force_finite=True):
This is done in 2 steps:
- 1. The cross correlation between each regressor and the target is computed,
- that is, ((X[:, i] - mean(X[:, i])) * (y - mean_y)) / (std(X[:, i]) *
- std(y)) using r_regression function.
+ 1. The cross correlation between each regressor and the target is computed
+ using :func:`r_regression` as::
+
+ E[(X[:, i] - mean(X[:, i])) * (y - mean(y))] / (std(X[:, i]) * std(y))
+
2. It is converted to an F score and then to a p-value.
:func:`f_regression` is derived from :func:`r_regression` and will rank
