scikit-learn icon indicating copy to clipboard operation
scikit-learn copied to clipboard

[MRG] Fix Erroneous Avg. Loss calculation

Open Harsh14901 opened this issue 3 years ago • 1 comments

Reference Issues/PRs

Fixes #23753

What does this implement/fix? Explain your changes.

Fix avg. loss calculation in presence of validation set and subsequently update the condition for early stopping

Any other comments?

Introduced a variable train_count to keep a track of the samples used for training.

Harsh14901 avatar Jun 29 '22 18:06 Harsh14901

Thanks for the PR @Harsh14901. If I'm not mistaken train_count = n_samples - validation_mask.sum(). It would be more efficient to compute it once before entering the outer loop.

jeremiedbb avatar Jun 30 '22 12:06 jeremiedbb