Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an example of how to implement class TfidfVectorizer #8519

Closed
wants to merge 3 commits into from

Conversation

ltcguthrie
Copy link

@ltcguthrie ltcguthrie commented Mar 4, 2017

Reference Issue

Example: Fixes #3846 for class TfidfVectorizer

What does this implement/fix? Explain your changes.

This code provides as an example of how to implement class TfidfVectorizer.

Any other comments?

@amueller
Copy link
Member

amueller commented Mar 4, 2017

Travis is returning an error.

@@ -1254,8 +1271,10 @@ class TfidfVectorizer(CountVectorizer):
The ``stop_words_`` attribute can get large and increase the model size
when pickling. This attribute is provided only for introspection and can
be safely removed using delattr or set to None before pickling.
"""

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the additional whitespace here.

>>> X = vectorizer.fit_transform(doc_test)
>>> print(type(X))
>>> vectorizer.get_feature_names()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove one or two of the lines.

@jmschrei
Copy link
Member

jmschrei commented Mar 4, 2017

Looks like the error stems from it not being able to load pandas. I think you can just remove that line to solve it, since you don't actually use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add examples to class docs
3 participants