Python-Text-Analysis
Python-Text-Analysis copied to clipboard
Alpha Hyperparameter is Deprecated
I still get a warning when I run the code but some students got an actual error.
This is the code that returns the error:
nmf = NMF( n_components=n_components, random_state=random_state, alpha=0.1, l1_ratio=0.5, init='nndsvda', max_iter=500).fit(tfidf)
This is the error students get:
TypeError: NMF.init() got an unexpected keyword argument 'alpha'
This is the warning I get:
/Users/renatabarreto/opt/anaconda3/lib/python3.7/site-packages/sklearn/decomposition/_nmf.py:1425: FutureWarning: alpha
was deprecated in version 1.0 and will be removed in 1.2. Use alpha_W
and alpha_H
instead
FutureWarning,