How to Solve NameError: name 'XGBRegressor' is not defined -- xgboost

Solution: Import the 'XGBRegressor' module

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

from xgboost import XGBRegressor

 

For more information:
Python xgboost XGBRegressor