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

Solution: Import the 'XGBClassifier' module

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

from xgboost import XGBClassifier

 

For more information:
Python xgboost XGBClassifier