text_html_output_1.png
from sklearn.ensemble import BaggingRegressor

from sklearn.metrics import mean_squared_error

from xgboost import XGBRegressor

from sklearn.ensemble import BaggingRegressor
regr = BaggingRegressor(base_estimator=XGBRegressor(), n_estimators=10, random_state=0).fit(X_train, y_train)
preds_valid = regr.predict(X_valid)
print(mean_squared_error(y_valid, preds_valid, squared=False))