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
3,358 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,840 points
654 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, 2022 in Python by Dev
• 6,000 points
676 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, 2022 in Python by CoolCoder
• 4,420 points
608 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
1,593 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
1,485 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
776 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