Closed adodge closed 6 years ago
The fit() method in sklearn has the signature fit(X,y) even if the class doesn't use the y value. This allows the object to be used in Pipelines, etc.
fit(X,y)
y
For example, note the fit() method for CountVectorizer: https://github.com/scikit-learn/scikit-learn/blob/bac89c2/sklearn/feature_extraction/text.py#L966
CountVectorizer
Thanks adodge, that's very useful!
The fit() method in sklearn has the signature
fit(X,y)
even if the class doesn't use they
value. This allows the object to be used in Pipelines, etc.For example, note the fit() method for
CountVectorizer
: https://github.com/scikit-learn/scikit-learn/blob/bac89c2/sklearn/feature_extraction/text.py#L966