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

[jvm-packages] xgboost4j 0.80 early stopping #3631

xuchaoqun opened this Issue Aug 24, 2018 · 1 comment


None yet
3 participants

xuchaoqun commented Aug 24, 2018

In class, method 'train', the early stopping logic is too simple, if any criterion value is greater than that before, stop it. But when evalMetric is 'auc', the stop condition must be reversed. So this code has not been finished yet?

        boolean decreasing = true;
        float[] criterion = metrics[metrics.length - 1];
        for (int shift = 0; shift < Math.min(iter, earlyStoppingRound) - 1; shift++) {
          **decreasing &= criterion[iter - shift] <= criterion[iter - shift - 1];**

        if (!decreasing) {
                  "early stopping after %d decreasing rounds", earlyStoppingRound));

This comment has been minimized.


CodingCat commented Aug 24, 2018

I think we need a parameter passed in that paramBag to indicate which direction we prefer when doing early stopping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment