2
$\begingroup$

I have a classification problem with class imbalance and after the oversampling, I get high recall ,accuracy and roc (around 0.85) while my precision and f1 is fairly low(0.50). I have used every kind of smote and undersammpling but I never get to achieve some balance between precision and recall.I have done some params tuning but when I try to increase my precision, my recall drops of course. Do you have any suggestions as to how i can increase my precision whilst not hurting the recall too much?

$\endgroup$

1 Answer 1

0
$\begingroup$

An important consideration is that your models are not giving categories. They are giving values on a continuum that are binned according to a threshold to give discrete categories (above the threshold is one category, below the threshold is the other). Moving this threshold around is what yields ROC curves.

A similar idea to ROC curves can be applied to precision and recall instead of specificity and recall. For a given model output, as you change the threshold, the predicted categories change. With these changing predicted categories come changing precision and recall. These precision and recall values can be plotted to give the precision-recall curve.

Thus, every model you have created gives not just one precision-recall pair but a bunch of them. It might be that a threshold other than the software default would give you the desired combination of precision and recall, and you might benefit from looking at these precision-recall curves.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.