当我使用 lightgbm 进行网格搜索时,我遇到了麻烦。
lgb_classifer = lgb.LGBMRegressor(random_state=12)
grid_lgb = {
'learning_rate': [0.01,0.05],
'num_iterations': [5,10,20]}
gbm_lgb = GridSearchCV(estimator =lgb_classifer, param_grid =grid_lgb, scoring = 'recall', cv=3)
---> gbm_lgb.fit(X_train, y_train)
ValueError: Classification metrics can't handle a mix of binary and continuous targets
X_train
AND都是。y_train
_ 是二进制标签。array
y_train