ROC Curve Best CutOff Point / Find Optimal Threshold

KNIME ROC Curve Help Required

Hello All, 
How we can find the best THRESHOLD /CUTOFF POINT value for getting most TP (SENSITVITY) and least FP(1 - SPECIFICITY) (basically a cut off point) by ROC curve in KNIME ? roc curve vis node doesn't give this sort of option that we can find and select a threshold other then 0.5 for default predictions .

Let me know if something remains unclear on this . I would elaborate more . Thanks in advance 

 

 

You could loop over the P(positive class) with threshold 0.0 0.1 0.2 0.3 ... 1.0 and score the accuracy at every step. Save accuracy and threshold at each iteration. The best threshold is the one with the highest accuracy.

For the loop you can use an Interval Loop (see video: https://www.youtube.com/watch?v=yEDkzIfckqE )

I hope this helps

Rosaria

Thank you very much rosaria for the guide .. I managed to follow that and made the logic build in knime wf . like below