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

Solution: Import the 'mean_absolute_error' module

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

from sklearn.metrics import mean_absolute_error

 

For more information:
Python sklearn mean_absolute_error