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

Solution: Import the 'metrics' module

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

from sklearn import metrics

 

For more information:
Python metrics sklearn