借鉴博客:https://blog.csdn.net/zuoyouzouzou/article/details/103046281
源代码在此:
model = xgb.XGBRegressor(n_estimators=150, learning_rate=0.1, gamma=0, subsample=0.8,\
colsample_bytree=0.9, max_depth=7)
应该是版本更新问题,借鉴csdn博客说法,在XGBRegressor里面加上objective ='reg:squarederror'
即可