The F-statistic/test can be used for feature selection, e.g. from http://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.f_classif.html#sklearn.feature_selection.f_classif

ANOVA F-value between label/feature for classification tasks.

Can the F-test only be used for features with numerical and continuous domain, or is it also valid for selecting discrete or categorical features? I get that idea, as the F-statistic is based on the mean and variance of a feature.


Assuming you are in the context of stepwise regression, the scale of the feature does not matter. The F-test is done on the difference of RSS values between the smaller and larger model as calculated on the outcome variable (also taking into to account the difference in the number of parameters).

For more information see: http://en.wikipedia.org/wiki/F-test#Regression_problems

  • 1
    $\begingroup$ Thanks. How about for F test for feature selection in classification? Is F test used for feature selection only for features with numerical and continuous domain, not for selecting discrete features or categorical features? $\endgroup$ – Tim May 15 '15 at 11:29
  • $\begingroup$ Your last question is very general, but I can give some information. A likelihood ratio test is a generalisation of a F-test in regression context. A likelihood ratio test can be used in the context of for example logistic regression. In this case the outcome variable is categorical. For more information see: en.wikipedia.org/wiki/… $\endgroup$ – spdrnl May 15 '15 at 11:48
  • 2
    $\begingroup$ In classification, the outcome is categorical. When select a feature for predicting the categorical outcome by F test or its generalization, must the feature be numerical and continuous, or can the feature also be categorical? $\endgroup$ – Tim May 15 '15 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.