I am working on a binary classification problem using random forests, neural networks etc with dataset size of 977 records (class proportion of 77:23)
I used balancedbaggingclassifier
with random forest to obtain the predictions.
My model gave an AUC of 81% (and f1-score of minority class is 60% only but biz is okay with it). So, I consider that my model has good/decent discriminative ability (to distinguish the classes).based on auc score.
However, when I look at my features (only 4 features in the dataset), I don't see much discrimination. aren't they? refer below
Based on the above graph, I feel like all the 4 features (and their values) have more or less equal bin width. Bars are arranged from top as F1,F2,F3 and F4
So, does this mean these features are not helpful? Or am I interpreting it incorrectly? Does it mean high values of all these 4 features is leading to class 1? low values of these 4 features is leading to class 0? is that the right way to interpret?
Can help me correct my understanding if I am wrong?
Due to imbalance, if you wish to see my lift, gain and KS chart, you can find them below
Best Answer
Your random forest and neural network models consider all sorts of (nonlinear) interactions between the raw features. For instance, a neural network can score extremely high on data like the following, with a $25$-node MLP scoring an AUC of $0.9997$.
However, the
x1
andx2
features on their own have no ability to distinguish between red and blue. The marginal distribution ofx1
is $U(0, 1)$ for both red and blue, and the marginal distribution ofx2
is $U(0, 1)$ for both red and blue. It is only when you consider the joint distribution through an interaction between the features, which your SHAP plot appears not to show.I think this is what has happened, that no one feature is important, but some combination of features winds up being quite important and is discovered by the machine learning model that is meant to learn such relationships without being explicitly programmed.