From bbf74a94a029c27200907b594974347c43f30edf Mon Sep 17 00:00:00 2001 From: har777 <hihari777@gmail.com> Date: Mon, 22 Jul 2013 13:14:59 +0530 Subject: [PATCH] DOC/FIX twenty_newsgroups.rst should use TfidfVectorizer Instead of Vectorizer. Fixes #2173. --- .mailmap | 1 + doc/datasets/twenty_newsgroups.rst | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index da54fb9eb9..a23cd42f3d 100644 --- a/.mailmap +++ b/.mailmap @@ -27,6 +27,7 @@ Federico Vaggi <vaggi.federico@gmail.com> Gael Varoquaux <gael.varoquaux@normalesup.org> Gael Varoquaux <gael.varoquaux@normalesup.org> <varoquau@normalesup.org> Gilles Louppe <g.louppe@gmail.com> <g.louppe@ulg.ac.be> +Harikrishnan S <hihari777@gmail.com> Hrishikesh Huilgolkar <hrishikesh911@gmail.com> <hrishikesh@QE-IND-WKS007.(none)> Immanuel Bayer <mane.desk@gmail.com> Jake VanderPlas <vanderplas@astro.washington.edu> <jakevdp@yahoo.com> diff --git a/doc/datasets/twenty_newsgroups.rst b/doc/datasets/twenty_newsgroups.rst index 09f7f3bfc9..8d8a5fad27 100644 --- a/doc/datasets/twenty_newsgroups.rst +++ b/doc/datasets/twenty_newsgroups.rst @@ -86,9 +86,9 @@ for statistical analysis. This can be achieved with the utilities of the example that extract `TF-IDF`_ vectors of unigram tokens:: - >>> from sklearn.feature_extraction.text import Vectorizer + >>> from sklearn.feature_extraction.text import TfidfVectorizer >>> documents = [open(f).read() for f in newsgroups_train.filenames] - >>> vectorizer = Vectorizer() + >>> vectorizer = TfidfVectorizer() >>> vectors = vectorizer.fit_transform(documents) >>> vectors.shape (1073, 21108) -- GitLab