Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

R-package. Bug in early stop callback function for maximize = TRUE #4587

@srijoyray

Description

@srijoyray

There is a bug in the early stop callback function #3938 when eval.metric needs to be maximized. The mx.callback.early.stop as soon as the evaluation increases even when the "maximize" is set to TRUE.

The line 138 of R-package/R/callback.R must be changed from

if (result$value > mx.best.score | (maximize == TRUE & result$value < mx.best.score)) {

to

if ((maximize == FALSE & result$value > mx.best.score) | (maximize == TRUE & result$value < mx.best.score)) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions