Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d671948 commit 2773f9aCopy full SHA for 2773f9a
scikits/learn/metrics/metrics.py
@@ -95,9 +95,10 @@ def roc_curve(y_true, y_score):
95
Examples
96
--------
97
>>> import numpy as np
98
+ >>> from scikits.learn import metrics
99
>>> y = np.array([1, 1, 2, 2])
100
>>> scores = np.array([0.1, 0.4, 0.35, 0.8])
- >>> fpr, tpr, thresholds = roc_curve(y, scores)
101
+ >>> fpr, tpr, thresholds = metrics.roc_curve(y, scores)
102
>>> fpr
103
array([ 0. , 0.5, 0.5, 1. ])
104
@@ -155,9 +156,10 @@ def auc(x, y):
155
156
157
158
159
160
161
>>> pred = np.array([0.1, 0.4, 0.35, 0.8])
- >>> fpr, tpr, _ = roc_curve(y, pred)
162
+ >>> fpr, tpr, thresholds = metrics.roc_curve(y, pred)
163
>>> print auc(fpr, tpr)
164
0.75
165
0 commit comments