GridSearchCV⾃定义评分函数ics import make_scorer
del_lection import GridSearchCV
浦东父女def my_custom_loss_func(y_true, y_pred):
家庭对孩子的影响an(np.abs((y_pred - y_true)/y_true))
mape = make_scorer(my_custom_loss_func, greater_is_better=Fal)
param_test1 = {
'n_estimators': [700,800]
}
init_param = {
走进山东
'booster':'gbtree',把春天留在心中
活络膏
'learning_rate': 0.2,
'n_estimators': 700,
'max_depth': 6,
'min_child_weight': 1,
'colsample_bytree':0.7,
'subsample': 0.8,
'reg_alpha': 0.05,
带大的成语 'gamma': 0.1,
'reg_lambda': 3,
'silent': 1,
'ed': 2020
}
航天英雄磁盘空间不足怎么清理
garch1 = GridSearchCV(
estimator=XGBRFRegressor(**init_param),
param_grid=param_test1, cv=5, verbo=1, n_jobs=4, scoring=mape
)
garch1.fit(new_train_X, train_y)