1
$\begingroup$

I have a data set with different feature types (numerical and categorical). I applied one-hot-encoding to the categorical features and then used ANOVA to find most relevant features. 6 of 66 features in total produce a result that almost as good as when using all feature. These 6 contain 3 numeric and 3 (binary features - which are result of one-hot-encoding). The results are good and I showed which feature are most relevant but the question is whether it was okay to apply ANOVA to these binary features?

$\endgroup$
1
$\begingroup$

There is nothing specifically about one-hot encoding that makes ANOVA inappropriate.

Most software (certainly R and SAS) does some version of coding of categorical variables for you. With R and SAS (and maybe others) you can choose among various parameterizations for categorical variables (effect coding, dummy coding, Helmert contrasts etc.)

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Since ANOVA asuumes that data is normally distributed it could be not appropriate because one hot encoded data may be not normally distributed? $\endgroup$ – methus Feb 9 at 14:29
  • $\begingroup$ @methus ANOVA does not assume that the data are normally distributed $\endgroup$ – Peter Flom Feb 9 at 16:47
  • $\begingroup$ Some assumptions I found: technologynetworks.com/informatics/articles/… What are the assumptions of a One-Way ANOVA? 1) Normality – That each sample is taken from a normally distributed population; 2) Sample independence – that each sample has been drawn independently of the other samples; 3) Variance Equality – That the variance of data in the different groups should be the same; 4) The dependent variable should be continuous $\endgroup$ – methus Feb 9 at 18:19
  • $\begingroup$ 1) How can I assume that the one-hot-encoded data (binary data) is taken from a normally distributed population? 2) Since one-hot-encoded data is binary, these type of data is also not continuous $\endgroup$ – methus Feb 9 at 18:23
  • $\begingroup$ Neither of those things is a problem for ANOVA. ANOVA does NOT assume the data are normal and does NOT assume the independent variables are continuous. $\endgroup$ – Peter Flom Feb 9 at 19:52

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.