2
$\begingroup$

While running decision tree, i have unbalanced data. The data balance is 93%(Class 0) to 7% (Class 1).

Now when i am plotting decision tree to understand the factors contributing to class 1 then in it, Most boxes are for 0 class(as it is 97% of the data).

Also after pruning very few contributors are there for are contributing to class 1. How can i get the factors contributing to class 1.

$\endgroup$
1
$\begingroup$

Which function are you using at Loss? Using the right one is important when dealing with imbalanced datasets. 7% is imbalanced, but not that bad.

Have you tried any eXplainable Artificial Intelligence (XAI) method? Normally I use Shap. It is really good to see which feature contributes in which direction. You can see an example here. Shap interpretation

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks, do you know equivalent package of "Shap" in R ? $\endgroup$ – SKB Jan 30 at 8:49
  • $\begingroup$ Also i am anticipating that Shap results will also be biased to class 0 and will show important variables contributing to 0 detection. Here i am more interested in knowing variables contributing to 1. $\endgroup$ – SKB Jan 30 at 8:55
  • $\begingroup$ About R, I dont know, there has to be something for sure. How about this rdocumentation.org/packages/iml/versions/0.9.0/topics/Shapley? $\endgroup$ – Carlos Mougan Jan 30 at 9:34
  • $\begingroup$ Check this link for dealing with imbalanced dataset, but for your case choosing the right metric should be okey kdnuggets.com/2017/06/7-techniques-handle-imbalanced-data.html $\endgroup$ – Carlos Mougan Jan 30 at 9:35

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.