How to change prediction threshold for binary classification?
Hi RapidMiner,
I'm building a binary classifier using different methods. But i notice that different methods use different thresholds on the confidence(yes) values to decide if the prediction is yes or no. For example, SVM uses 0.5 as the threshold. However, Gradient Boosted Trees (GBT) seems to set the threshold as 0.1. So i'd like to ask if there's a way to change this threshold for GBT, cause this will affect the accuracy computed in the Performance operator (if i could set the threshold as 0.5 for GBT, i will get a higher accuracy).
I attached the process together with the trained models and testing data in this message. If you run the process, you will see some records in the prediction result (e.g. row number 368, 471, 529, 573) have confidence(yes) < 0.2 but the predictions are yes.
Thanks a lot for your help!
Best,
phivu
Best Answer
-
MartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
Hi phivu,
have a look at the Create andApply Threshold operators. They should do the trick.
~Martin
- Sr. Director Data Solutions, Altair RapidMiner -
Dortmund, Germany6
Answers
This works great, thank you Martin!
phivu