8000 DOC: updating doc for StratifiedKFold + ellipsis in svm support · scikit-learn/scikit-learn@c4b9b00 · GitHub
[go: up one dir, main page]

Skip to content

Commit c4b9b00

Browse files
agramfortGaelVaroquaux
authored andcommitted
DOC: updating doc for StratifiedKFold + ellipsis in svm support
1 parent 0bc70b1 commit c4b9b00

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

doc/modules/cross_validation.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ Example of stratified 2-fold:
162162
>>> from scikits.learn.cross_val import StratifiedKFold
163163
>>> X = [[0., 0.], [1., 1.], [-1., -1.], [2., 2.], [3., 3.], [4., 4.], [0., 1.]]
164164
>>> Y = [0, 0, 0, 1, 1, 1, 0]
165-
>>> loo = StratifiedKFold(Y, 2)
166-
>>> print loo
165+
>>> skf = StratifiedKFold(Y, 2)
166+
>>> print skf
167167
scikits.learn.cross_val.StratifiedKFold(labels=[0 0 0 1 1 1 0], k=2)
168-
>>> for train, test in loo: print train,test
169-
[False False True False True True True] [ True True False True False False False]
170-
[ True True False True False False False] [False False True False True True True]
171-
168+
>>> for train, test in skf: print train, test
169+
[False True False False True False True] [ True False True True False True False]
170+
[ True False True True False True False] [False True False False True False True]
171+
172172

173173

174174

doc/modules/svm.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ SVMs perform classification as a function of some subset of the
8686
training data, called the support vectors. These vectors can be
8787
accessed in member `support_`:
8888

89-
>>> clf.support_
90-
array([0, 1])
89+
>>> clf.support_ #doctest: +ELLIPSIS
90+
array([0, 1]...)
9191

9292
Member `n_support_` holds the number of support vectors for each class:
9393

94-
>>> clf.n_support_
95-
array([1, 1])
94+
>>> clf.n_support_ #doctest: +ELLIPSIS
95+
array([1, 1]...)
9696

9797

9898
.. topic:: Examples:

0 commit comments

Comments
 (0)
0