I was given a dataset with 500 features which, after one-hot encoding, looks like this:
Class = 1 means "anomaly", class = 0 is "normal". So basically my task is simple ML classification. But another part of this task is to explain, why this data (which has class = 1) is anomalous. I wanted to build some graphs detect anomalies on pictures, but the problem is that one-hot encoding is used and I can't do anything about it.
I've started with using
feature_importances_, but they don't give enough information specifically about class = 1.
rf = RandomForestClassifier() rf.fit(X,y) plt.plot(rf.feature_importances_)
Could you please tell me, what statistic methods (or maybe something else) should I use to explain why some of my data are anomalous?