wagenaartje / neataptic

:rocket: Blazing fast neuro-evolution & backpropagation for the browser and Node.js
https://wagenaartje.github.io/neataptic/
Other
1.19k stars 279 forks source link

Added complex early stopping based on schedule function #138

Open Kaisle opened 6 years ago

Kaisle commented 6 years ago

Thanks for an awesome implementation.

I was missing the option to halt training based on a custom condition so I implemented a way to do this using the schedule function.

If the schedule function returns false, training will stop.

This allows you to do a complex early stopping where you stop training if the error rates goes up by a certain amount or doesn't improve beyond a certain amount. It's also minimally invasive to the existing project.

I have updated the documentation to reflect the change.

I hope you will consider it.