mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-04-28 22:36:24 +02:00
bug fix to prevent infinite loop because of incorrect stopping condition
This commit is contained in:
parent
f9a0325b9e
commit
b58c8a0ab9
1 changed files with 1 additions and 1 deletions
|
|
@ -150,7 +150,7 @@ class EPBase(object):
|
||||||
def _stop_criteria(self, ga_approx):
|
def _stop_criteria(self, ga_approx):
|
||||||
tau_diff = np.mean(np.square(ga_approx.tau-self.ga_approx_old.tau))
|
tau_diff = np.mean(np.square(ga_approx.tau-self.ga_approx_old.tau))
|
||||||
v_diff = np.mean(np.square(ga_approx.v-self.ga_approx_old.v))
|
v_diff = np.mean(np.square(ga_approx.v-self.ga_approx_old.v))
|
||||||
return ((tau_diff > self.epsilon) or (v_diff > self.epsilon))
|
return ((tau_diff < self.epsilon) and (v_diff < self.epsilon))
|
||||||
|
|
||||||
def __setstate__(self, state):
|
def __setstate__(self, state):
|
||||||
super(EPBase, self).__setstate__(state[0])
|
super(EPBase, self).__setstate__(state[0])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue