text_html_output_1.png
from sklearn import metrics

from xgboost import XGBRegressor

model = XGBRegressor(objective='reg:squarederror')
model.fit(x_train, y_train)

pred = model.predict(x_test)

metrics.r2_score(y_test, pred)

metrics.mean_absolute_error(y_test, pred)