dmlc / dmlc/xgboost

customizable early stopping

Open
#3,822 0 comments 0 reactions 0 assignees View on GitHub
type: roadmap
Dominant language
C++
Stars
28.8k
Forks
8.9k
Avg merge
1d 12h
Merged PRs (30d)
54

Description

proposed by @deepxg in https://github.com/dmlc/xgboost/pull/3808#issuecomment-432153422

"Can I suggest that we make early stopping a policy-based API with some sort of callback? So instead of just a count and a direction, we supply an object which receives the metrics up to the current round, and whatever other information might be useful, and we have a default implementation that is just the normal early stopping after X rounds without increase/decrease. I ask because I suspect there might be circumstances where you care about more than just an absolute number of rounds, or you might for efficiency reasons want to stop training even while still decreasing, just because the returns appear to be diminishing. Externalising the decision and making it configurable would future-proof the API somewhat.

So, just something like IStopping with boolean shouldStopAfter(float[][] metrics) in the simplest case, but arguments could be made for more context. Making these objects stateful across training runs also simplifies the logic in the early stopping case, as you can just maintain the min/max as you go, and a count of how long ago it was."

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.