Skip to content

[R-package] exclude training data from being checked for early stopping #2472

@StrikerRUS

Description

@StrikerRUS

Check all datasets in validation list for early stopping excluding the training data to match the Python-package behavior:

Early stopping requires at least one set in valid_sets. If there is more than one, it will use all of them except the training data:
https://github.com/microsoft/LightGBM/blob/master/docs/Python-Intro.rst#early-stopping

Refer to #2371.
Python code:
https://github.com/microsoft/LightGBM/blob/5c0daca0a1ae601aa2bdcaa0d2fc16bcf3be150a/python-package/lightgbm/callback.py#L238-L241

C++ code:
https://github.com/microsoft/LightGBM/blob/5c0daca0a1ae601aa2bdcaa0d2fc16bcf3be150a/src/io/config.cpp#L237-L248

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions