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

+1 vote

Oct 17, 2019 in Python by Ram
• 130 points
2,336 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, 2019 by Saira

Related Questions In Python

0 votes
1 answer

How do I get the number of elements in a list?

Hello, The len() function can be used with several different ...READ MORE

answered Nov 18, 2020 in Python by Niroj
• 82,800 points
208 views
0 votes
1 answer

How do I get the number of elements in a list

items = [] items.append("apple") items.append("orange") items.append("banana") len(items) #use the ...READ MORE

answered Feb 15 in Python by Dev
• 6,000 points
83 views
0 votes
1 answer

How do I get the number of elements in a list

The len() function can be used with several different ...READ MORE

answered Feb 15 in Python by CoolCoder
• 4,360 points
103 views
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,560 points
850 views
0 votes
2 answers

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

n=[1,2,3,4,5,6,7,8,9] print(len(n)) =9 READ MORE

answered Dec 10, 2020 in Python by anonymous
775 views
+1 vote
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 Nov 18, 2019 in Python by Eric
300 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP