How to Solve NameError: name 'train_test_split' is not defined -- surprise

Solution: Import the 'train_test_split' module

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

from surprise.model_selection import train_test_split

 

For more information:
Python surprise train_test_split