JasonKessler / scattertext

Beautiful visualizations of how language differs among document types.
Apache License 2.0
2.23k stars 287 forks source link

Fix deprecated argument #126

Closed jlondonobo closed 1 year ago

jlondonobo commented 1 year ago

What it does

This PR updates the name of the argument alpha to alpha_W in the function get_topics_from_model.

Why

Since version 1.2.0, scikit-learn deprecated the argument alpha for the class NMF. This broke scattertext as mentioned in #125.

JasonKessler commented 1 year ago

Thanks so much for the PR and for alerting me to this issue. I'm going to drop the alpha parameter from the NNF constructor and call it a day. I'd rather drop that parameter (which doesn't seem to do much) than add a package version constraint that will result in headaches for users and raise the minimum Python version to 3.8.