-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] Add docs for TfidfTransformer.idf_ (Fixes #8267) #8528
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8528 +/- ##
=======================================
Coverage 95.48% 95.48%
=======================================
Files 342 342
Lines 60913 60913
=======================================
Hits 58160 58160
Misses 2753 2753
Continue to review full report at Codecov.
|
@@ -189,7 +189,7 @@ def build_preprocessor(self): | |||
# hundreds of nanoseconds which is negligible when compared to the | |||
# cost of tokenizing a string of 1000 chars for instance. | |||
noop = lambda x: x | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the whitespace
Attributes | ||
---------- | ||
idf_ : numpy array of shape [n_features, 1] | ||
returns None unless use_idf=True, then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would not usually describe an attribute with "returns".
---------- | ||
idf_ : numpy array of shape [n_features, 1] | ||
returns None unless use_idf=True, then | ||
returns 1-D matrix containing idf(d,t). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get what d
is and why this 1-d vector is a function of two indices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm closing the other PR (#8532) as it is a duplicate and this one has more reviews...
@@ -996,6 +996,12 @@ class TfidfTransformer(BaseEstimator, TransformerMixin): | |||
sublinear_tf : boolean, default=False | |||
Apply sublinear tf scaling, i.e. replace tf with 1 + log(tf). | |||
|
|||
Attributes | |||
---------- | |||
idf_ : numpy array of shape [n_features, 1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a property.
fixed in #10899 |
Reference Issue
Fixes #8267
What does this implement/fix? Explain your changes.
Any other comments?