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

Solution: Import the 'load_iris' module

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

from sklearn.datasets import load_iris

 

For more information:
Python sklearn load_iris