gregversteeg / corex_topic

Hierarchical unsupervised and semi-supervised topic models for sparse count data with CorEx
Apache License 2.0
627 stars 120 forks source link

Add `y` argument to fit method, for sklearn compatibility #17

Closed adodge closed 6 years ago

adodge commented 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.

For example, note the fit() method for CountVectorizer: https://github.com/scikit-learn/scikit-learn/blob/bac89c2/sklearn/feature_extraction/text.py#L966

gregversteeg commented 6 years ago

Thanks adodge, that's very useful!