text_plain_output_1.png
from sklearn.pipeline import Pipeline

from sklearn.preprocessing import StandardScaler

from xgboost import XGBRegressor

my_model = XGBRegressor(base_score=0.5, colsample_bylevel=1, colsample_bytree=1, gamma=0, learning_rate=0.1, max_delta_step=0, max_depth=10, min_child_weight=5, n_estimators=150, nthread=-1, reg_alpha=0, reg_lambda=1, scale_pos_weight=1, seed=0, subsample=1, eval_metric='mlogloss')
PIPE = Pipeline(steps=[('preproc', StandardScaler()), ('model', my_model)])
PIPE.fit(x_train, y_train)
PIPE.score(x_valid, y_valid)