0
$\begingroup$

I want to ask how to prune a decision tree CLASSIFIER? I know that for decision tree REGRESSOR, we usually look at the MSE to find the max depth, but what about for classifier? I have been using confusion matrix and prediction accuracy score to evaluate the performance of the model at each depth, but the model continues to have a high false-negative rate, I wonder how else can I prune the model.

Thank you and I wish you good health!

$\endgroup$
0
$\begingroup$

You can use any metric you want. The best metric to use depends on the data you have. You can consider using the F1 score. Depending on the averaging technique you use, you can nudge things towards reducing false negatives.

If you are using python/sklearn, you can pick your averaging method in the argument (https://scikit-learn.org/stable/modules/generated/sklearn.metrics.f1_score.html).

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you very much. I used grid search cv to look for the best parameters for my decision tree classifier and used weighted scoring for the scoring method because my dataset is unbalanced -- there is a large number of false cases in the label. Did I use the right scoring method here (for this reason)? $\endgroup$ – Edward Lam Apr 1 at 0:28

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.