Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the meaning of p-values which produced by feature selection (i.e. chi2 method)? [closed]

Recently, I have used sklearn(a python meachine learning library) to do a short-text classification task. I found that SelectKBest class can choose K best of features. However, the first argument of SelectKBest is a score function, which "taking two arrays X and y, and returning a pair of arrays (scores, pvalues)". I know that scores, but what is the meaning of pvalues?

like image 654
Qinghua Avatar asked May 15 '14 12:05

Qinghua


1 Answers

In general the p-value indicates how probable a given outcome or a more extreme outcome is under the null hypothesis. In your case of feature selection, the null hypothesis is something like this feature contains no information about the prediction target, where no information is to be interpreted in the sense of the scoring method: If your scoring method tests e.g. univariate linear interaction (f_classif, f_regression in sklearn.feature_selection are options for your scoring function), then the null hypothesis says that this linear interaction is not present.

TL;DR The p-value of a feature selection score indicates the probability that this score or a higher score would be obtained if this variable showed no interaction with the target.

Another general statement: scores are better if greater, p-values are better if smaller (and losses are better if smaller)

like image 58
eickenberg Avatar answered Oct 24 '22 04:10

eickenberg