Skip to content

Inconsistent documentation on return format in CountVectorizer and TfidfVectorizer fit_transform method #16776

Closed

Description

@bmaingret

Hi,

The documentation for fit_transform method of the Count_Vectorizer class have an inconsistency I think:

Learn the vocabulary dictionary and return term-document matrix.

versus

Returns
-------
X : array, [n_samples, n_features]
Document-term matrix.

Not a major issue but can be confusing.

It should be

Learn the vocabulary dictionary and return document-term matrix.

to be consistent and in line with code.

I can correct it if you wish.

"""Learn the vocabulary dictionary and return term-document matrix.

Activity

  1. NicolasHug commented on Mar 27, 2020

    @NicolasHug
    Member

    PR welcome @bmaingret

  2. bmaingret commented on Mar 28, 2020

    @bmaingret
    ContributorAuthor

    Same issue in class TfidfVectorizer

    """Learn vocabulary and idf, return term-document matrix.

  3. changed the title [-]Inconsistent documentation on return format in Count_Vectorizer.fit_transform() [/-] [+]Inconsistent documentation on return format in CountVectorizer.fit_transform() [/+] on Mar 28, 2020
  4. changed the title [-]Inconsistent documentation on return format in CountVectorizer.fit_transform() [/-] [+]Inconsistent documentation on return format in CountVectorizer and TfidfVectorizer fit_transform method[/+] on Mar 28, 2020
  5. bmaingret commented on Mar 29, 2020

    @bmaingret
    ContributorAuthor

    take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions