I want to study the feature importance of a model with a continuous not normally distributed variable as response and a set of categorical and ordinal independent variables, with unequal variances in most of the groups:

  • gender (M/F): categorical, unequal variances (levene test p-val<0.001)
  • country (Ctr1/Ctr2): : categorical, unequal variances (levene test p-val<0.05)
  • employment status (employed/unemployed): categorical, unequal variances (levene test p-val<0.001)
  • urbanisation level of the area (1/2/3): ordinal, equal variances (levene test p-val>0.05)
  • age group (1/2/3/4): : ordinal, equal variances (levene test p-val>0.05)

Given the nature of the features, I thought of applying an N-Way Welch Anova. But I am not sure how to do it in Python. Plus I am unsure if the results would be relevant given the non-normality of the response.

Would the results from a N-way Anova or even a linear regression implementation be relevant for this case? My objective is to assess the relative importance of the features on the response.


1 Answer 1


Since you know that your response is not normal, don't use ANOVA, it presumes normality.

But the good news is that there are other cool methods to determine feature importance. One of my favorites is random forest, but you could also use mutual information or lots of other techniques. An introduction with implementations in python can be found e.g. here.

  • 1
    $\begingroup$ If you are satisfied with the answer, please accept it. If not, you could consider leaving a comment detailing what you are missing. $\endgroup$
    – frank
    Commented Mar 19, 2022 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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