8000 DOC: Remove superfluous assignment in tutorial. issue #8285 (#8314) · scikit-learn/scikit-learn@bae38a2 · GitHub
[go: up one dir, main page]

Skip to content

Commit bae38a2

Browse files
seanpwilliamsjnothman
authored andcommitted
DOC: Remove superfluous assignment in tutorial. issue #8285 (#8314)
* remove assignment per recommendation * Fix doctests
1 parent 533ef15 commit bae38a2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/tutorial/text_analytics/working_with_text_data.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ The names ``vect``, ``tfidf`` and ``clf`` (classifier) are arbitrary.
324324
We shall see their use in the section on grid search, below.
325325
We can now train the model with a single command::
326326

327-
>>> text_clf = text_clf.fit(twenty_train.data, twenty_train.target)
327+
>>> text_clf.fit(twenty_train.data, twenty_train.target) # doctest: +ELLIPSIS
328+
Pipeline(...)
328329

329330

330331
Evaluation of the performance on the test set
@@ -353,7 +354,8 @@ classifier object into our pipeline::
353354
... ('clf', SGDClassifier(loss='hinge', penalty='l2',
354355
... alpha=1e-3, n_iter=5, random_state=42)),
355356
... ])
356-
>>> _ = text_clf.fit(twenty_train.data, twenty_train.target)
357+
>>> text_clf.fit(twenty_train.data, twenty_train.target) # doctest: +ELLIPSIS
358+
Pipeline(...)
357359
>>> predicted = text_clf.predict(docs_test)
358360
>>> np.mean(predicted == twenty_test.target) # doctest: +ELLIPSIS
359361
0.912...

0 commit comments

Comments
 (0)
0