Old version of sklearn method

Hello Learners,

In the Ungraded Lab - Algorithmic Dimensionality Reduction there is an old version of method in use:

feature_names = vectorizer.get_feature_names()

It throws an AttributeError, because there is a new version of this method in sklearn. It should be changed to:

feature_names = vectorizer.get_feature_names_out()

which works just fine. I’ve already reported an issue in the Coursera panel.

Same goes for function try_NMF(n_comp) which should also have updated version of this method.

Thanks for reporting. The staff have been notified.