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

Solution: Import the 'cross_val_predict' module

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

from sklearn.model_selection import cross_val_predict

 

For more information:
Python sklearn cross_val_predict