Skip to content
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

Update: EarlyStop condition with default delta #19

Open
DhruvAwasthi opened this issue Nov 5, 2022 · 0 comments
Open

Update: EarlyStop condition with default delta #19

DhruvAwasthi opened this issue Nov 5, 2022 · 0 comments

Comments

@DhruvAwasthi
Copy link

Do you think the early stopping condition check in line number 36 in __cal__() function of EarlyStopping class should be less than or equal to instead of just less than?

The logic behind this is:
When we go with the default values, the delta is 0 this means the early stopping condition check defaults to:
score < self.best_score

Now consider the case when the score is not improving and it is constant throughout the epochs. In this case, the score will never be less than the best_score. Hence, this will not early stop.
In order to incorporate this case i.e. when score is not improving and is constant throughout the epochs, the EarlyStopping counter should start, and it should terminate eventually after we run out of patience.

Hence, the early stop condition check should change from:
elif score < self.best_score + self.delta:
to,
elif score <= self.best_score + self.delta:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant