# HG changeset patch # User James Bergstra # Date 1224799546 14400 # Node ID 40c8a46b3da7dd8b293573df902406d10588d7f9 # Parent 31acd42b2b0bb620444eeb94981a1f9b5490e71c added Stopper.find_min diff -r 31acd42b2b0b -r 40c8a46b3da7 stopper.py --- a/stopper.py Thu Oct 23 18:05:09 2008 -0400 +++ b/stopper.py Thu Oct 23 18:05:46 2008 -0400 @@ -47,6 +47,17 @@ best = save() return best + def find_min(self, step, check, save): + best = None + for stp in self: + step() + if stp.set_score: + stp.score = check() + if (stp.score < stp.best_score) and save: + best = save() + return best + + class ICML08Stopper(Stopper): @staticmethod