How to Solve NameError: name 'TruncatedSVD' is not defined -- sklearn

Solution: Import the 'TruncatedSVD' module

To Solve the error, add the following line to the top of your code.

from sklearn.decomposition import TruncatedSVD

 

For more information:
Python TruncatedSVD sklearn