how do i get a optimal cutoff value(directly in the form of numeric) from roc curves?

+1 vote

Oct 17 in Python by Ram
• 130 points
121 views

1 answer to this question.

+1 vote

The optimal CutOff value is the point where there is high true positive rate and low false positive rate. According to this logic, you can use the below code to get the value:

optimal_idx = np.argmax(tpr - fpr)
optimal_threshold = thresholds[optimal_idx]
answered Oct 17 by Saira

Related Questions In Python

0 votes
1 answer

In NumPy how do I get the maximum of subsets? Python

You can use np.maximum.reduceat: >>> _, idx = np.unique(g, ...READ MORE

answered Nov 9, 2018 in Python by Nymeria
• 3,520 points
78 views
0 votes
1 answer

How can I get the count of a list in Python?

len() >>> mylist=[] >>> print len(mylist) 0 READ MORE

answered Dec 12, 2018 in Python by charlie_brown
• 7,720 points
95 views
0 votes
1 answer
0 votes
1 answer

how do I check the length of an array in a python program?

lets say we have a list mylist = ...READ MORE

answered Mar 12 in Python by Mohammad
• 3,060 points
58 views
0 votes
0 answers

how do i get the list of all the keys in my dictionary?

can you give an example? with the ...READ MORE

May 6 in Python by Waseem
• 4,470 points
16 views
0 votes
1 answer
+1 vote
1 answer
0 votes
1 answer

How do I create a dataframe using a dictionary in pandas?

Hi @Hannah, You need to define your dictionary ...READ MORE

answered 8 hours ago in Python by Eric
3 views