text_plain_output_1.png
from sklearn.metrics import mean_squared_error

from xgboost import XGBRegressor

model = XGBRegressor(n_estimators=5000, n_jobs=4, learning_rate=0.005, max_depth=5, colsample_bytree=0.5, tree_method='hist', random_state=0)
model.fit(X_train, y_train, early_stopping_rounds=5, eval_set=[(X_valid, y_valid)], eval_metric='rmse', verbose=False)
preds_valid = model.predict(X_valid)
print(mean_squared_error(y_valid, preds_valid, squared=False))