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

Solution: Import the 'accuracy' module

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

from surprise import accuracy

 

For more information:
Python surprise accuracy