From the following link:
This is done in 2 steps:
- The correlation between each regressor and the target is computed, that is, ((X[:, i] - mean(X[:, i])) * (y - mean_y)) / (std(X[:, i]) * std(y)).
- It is converted to an F score then to a p-value.
I can't seem to find information about how one would convert a correlation between $x_i, y$ into an F score though.