import xgboost as xgb from sklearn.model_selection import GridSearchCV from sklearn.datasets import load_boston from sklearn.metrics import mean_squared_error # データ読み込み boston = load_boston() X_train, X_test = boston.data[:400], boston.data[400:] y_train, y_test = boston.target[:400], boston.target[400:] # xgboostモデルの作成 reg = xgb.XGBRegressor() # ハイパーパラメータ探索 reg_cv = GridSearchCV(reg, {'max_depth'