8000
We read every piece of feedback, and take your input very seriously.
1 parent 1fcc505 commit 357d4d3Copy full SHA for 357d4d3
doc/tutorial/text_analytics/working_with_text_data.rst
@@ -324,7 +324,8 @@ The names ``vect``, ``tfidf`` and ``clf`` (classifier) are arbitrary.
324
We shall see their use in the section on grid search, below.
325
We can now train the model with a single command::
326
327
- >>> text_clf = text_clf.fit(twenty_train.data, twenty_train.target)
+ >>> text_clf.fit(twenty_train.data, twenty_train.target) # doctest: +ELLIPSIS
328
+ Pipeline(...)
329
330
331
Evaluation of the performance on the test set
@@ -353,7 +354,8 @@ classifier object into our pipeline::
353
354
... ('clf', SGDClassifier(loss='hinge', penalty='l2',
355
... alpha=1e-3, n_iter=5, random_state=42)),
356
... ])
- >>> _ = text_clf.fit(twenty_train.data, twenty_train.target)
357
358
359
>>> predicted = text_clf.predict(docs_test)
360
>>> np.mean(predicted == twenty_test.target) # doctest: +ELLIPSIS
361
0.912...