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

Solution: Import the 'KFold, cross_val_score' module

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

from sklearn import KFold

 

For more information:
Python KFold sklearn