from sklearn import datasets from sklearn.model_selection import train_test_split from xgboost import XGBClassifier # load data iris = datasets.load_iris() X = iris.data y = iris.target # split data into train and test sets X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42) # create the XGBClassifier model model = XGBClassifier() # train the model model.fit(X_train, y_train) # evaluate the model score = model.score(X_test, y_test) print("Accuracy score: ", score)In this example, we are loading the iris dataset, splitting the data into train and test sets, and then creating an instance of the XGBClassifier model. We then train the model using the training data and evaluate its accuracy using the test data. The XGBClassifier model is part of the XGBoost package library in Python.