# Score of ANOVA in selected features

I selected features using ANOVA (because I have Numerical data as input and Categorical data as target):

anova = SelectKBest(score_func=f_classif, k='all')
anova.fit(X_train, y_train.values.argmax(1)) # y_train.values.argmax(1) because I already one-hot-encoded the target.


When I plot the score, it show me the figure in image :

plt.xlabel("Number of features selected")
plt.ylabel("Score (nb of correct classifications)")
plt.plot(range(len(anova.scores_)), anova1.scores_)
plt.show()


What does the interpretation of this figure ? why there is some interruption in the plot ?

• What do you mean that you’ve selected features using ANOVA? – Dave Jun 19 at 13:20
• ANOVA is a Feature Selection method, right ? – Mimi Jun 19 at 13:27
• ANOVA is a way of testing of multiple groups have the same mean. How do you apply that to feature selection? (I have my ideas, but all that matters is what you did.) – Dave Jun 19 at 13:29
• Dear @Dave Thank you for this information, you could see what I mean by using this method in this link: machinelearningmastery.com/… – Mimi Jun 19 at 13:45

You have misunderstood what the anova returns. It returns a list of importance for each feature.