Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2773f9a

Browse files
author
Fabian Pedregosa
committed
Some doctest fixes.
1 parent d671948 commit 2773f9a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scikits/learn/metrics/metrics.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ def roc_curve(y_true, y_score):
9595
Examples
9696
--------
9797
>>> import numpy as np
98+
>>> from scikits.learn import metrics
9899
>>> y = np.array([1, 1, 2, 2])
99100
>>> scores = np.array([0.1, 0.4, 0.35, 0.8])
100-
>>> fpr, tpr, thresholds = roc_curve(y, scores)
101+
>>> fpr, tpr, thresholds = metrics.roc_curve(y, scores)
101102
>>> fpr
102103
array([ 0. , 0.5, 0.5, 1. ])
103104
@@ -155,9 +156,10 @@ def auc(x, y):
155156
Examples
156157
--------
157158
>>> import numpy as np
159+
>>> from scikits.learn import metrics
158160
>>> y = np.array([1, 1, 2, 2])
159161
>>> pred = np.array([0.1, 0.4, 0.35, 0.8])
160-
>>> fpr, tpr, _ = roc_curve(y, pred)
162+
>>> fpr, tpr, thresholds = metrics.roc_curve(y, pred)
161163
>>> print auc(fpr, tpr)
162164
0.75
163165

0 commit comments

Comments
 (0)