Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best vs mean CV score #1

Open
MiladShahidi opened this issue Sep 21, 2018 · 1 comment
Open

Best vs mean CV score #1

MiladShahidi opened this issue Sep 21, 2018 · 1 comment

Comments

@MiladShahidi
Copy link

Thank you for this helpful notebook. Can you explain why you return the best cv scores in the objective function? Isn't that an overly optimistic (upward bias) measure of performance?
I believe the results of the n_fold cross validations should be averaged and returned as the score/loss. Am I missing something?

@WillKoehrsen
Copy link
Owner

WillKoehrsen commented Sep 21, 2018

You are correct that the average metric from all the folds should be used as the measure of performance. If you look at the code for the objective function, I do return the average roc-auc over the folds.

best_score = np.max(cv_results['auc-mean'])
loss = 1 - best_score

auc-mean is the average auc over the cross-validation folds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants