You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi i nee help, still new in machine learning and willing to learn.
I am using lightgbm cv and i need to be able to print out my best AUC score on an each every fold using lgb cv without doing parameter tuning.
i.e fold 1 AUC : 81.2
fold 2 AUc : 83
......
Currently i only see AUC mean per iteration from my cv_results. See my code Below
I am using lightgbm cv and i need to be able to print out my best AUC score on an each every fold using lgb cv without doing parameter tuning.
Unfortunately, it is not possible yet. We already have some feature requests regarding this: #2105, #283. You can comment there with description of desired behavior you want to see in LightGBM.
Summary
Hi i nee help, still new in machine learning and willing to learn.
I am using lightgbm cv and i need to be able to print out my best AUC score on an each every fold using lgb cv without doing parameter tuning.
i.e fold 1 AUC : 81.2
fold 2 AUc : 83
......
Currently i only see AUC mean per iteration from my cv_results. See my code Below
params = {
'objective': 'binary',
'boosting': 'gbdt',
'max_depth':-1,
'num_leaves': 31, # 2^max_depth - 1
'learning_rate': 0.1,
'min_data_in_leaf':20,
'min_child_samples': 20,
'min_child_weight':0.001,
'verbose': 0,
}
params['metric'] = 'auc'
num_rounds = 5000
lgtrain = lgb.Dataset(train, label=labelTrain)
lgvalid = lgb.Dataset(test, label=labelTest,reference=lgtrain)
#replace this with cv only
cv_results = lgb.cv(params,
lgtrain,
nfold=5,
stratified=False ,
num_boost_round = num_rounds,
early_stopping_rounds = 10, metrics = {'auc'},
seed = 50)
cv_results = pd.DataFrame(cv_results)
cv_results.to_csv('cv_results.csv')
Best_rounds =np.argmax((cv_results['auc-mean']))
best_score = max(cv_results['auc-mean'])
The text was updated successfully, but these errors were encountered: