Machine Learning, Artificial Intelligence, Data Science, Ai Projects, Calories.
build an XGBRegressor for this prediction. from xgboost import XGBRegressor xgbr = XGBRegressor() xgbr.fit(X_train, y_train) xgbr_prediction = xgbr.predict(X_test) from sklearn.metrics import mean_absolute_error as mae, r2_score as r2 xgbr_mae = mae(y_test, xgbr_prediction) xgbr_mae #