diff --git a/GPy/core/parameterization/parameter_core.py b/GPy/core/parameterization/parameter_core.py index d29c5244..876e4816 100644 --- a/GPy/core/parameterization/parameter_core.py +++ b/GPy/core/parameterization/parameter_core.py @@ -554,6 +554,11 @@ class Indexable(Nameable, Observable): plist = list(plist) plist.append(self) self._highest_parent_.ties.tie_together(plist) + + def untie(self, *plist): + plist = list(plist) + plist.append(self) + self._highest_parent_.ties.untie(plist) #=========================================================================== # Constrain operations -> done diff --git a/GPy/core/parameterization/parameterized.py b/GPy/core/parameterization/parameterized.py index f2fd4a27..c5e40458 100644 --- a/GPy/core/parameterization/parameterized.py +++ b/GPy/core/parameterization/parameterized.py @@ -161,12 +161,11 @@ class Parameterized(Parameterizable): parent.size += param.size parent = parent._parent_ + self._notify_parent_change() + self._highest_parent_._notify_parent_change() if not self._in_init_: self._connect_parameters() - self._notify_parent_change() - self._highest_parent_._connect_parameters(ignore_added_names=_ignore_added_names) - self._highest_parent_._notify_parent_change() self._highest_parent_._connect_fixes() if isinstance(param,Parameterized): diff --git a/GPy/core/parameterization/ties_and_remappings.py b/GPy/core/parameterization/ties_and_remappings.py index a068bfca..f36219b6 100644 --- a/GPy/core/parameterization/ties_and_remappings.py +++ b/GPy/core/parameterization/ties_and_remappings.py @@ -56,7 +56,7 @@ class Tie(Parameterized): 1. Add the support for multiple parameter tie_together and tie_vector 2. Properly handling parameters with constraints 3. Properly handling the merging of two models [DONE] - 4. Properly handling initialization + 4. Properly handling initialization [DONE] """ def __init__(self, name='Ties'): @@ -102,7 +102,7 @@ class Tie(Parameterized): self._remove_unnecessary_ties() self._update_label_buf() self.updates = True - + def _sync_val_group(self, plist): val = np.asarray([p.param_array for p in plist]).mean() def _set_val(p): @@ -238,7 +238,6 @@ class Tie(Parameterized): self._update_label_buf() self.updates = True - def _check_change(self): changed = False if self.tied_param is not None: