From 146dff7cbf4434ec814bf5e5e52f4b24c8f2898e Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Wed, 26 Jun 2013 17:04:10 +0100 Subject: [PATCH] _get/set_params into parameterized --- GPy/core/model.py | 4 ---- GPy/core/parameterized.py | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/GPy/core/model.py b/GPy/core/model.py index fe5d5181..d4c8c974 100644 --- a/GPy/core/model.py +++ b/GPy/core/model.py @@ -23,10 +23,6 @@ class Model(Parameterized): self.sampling_runs = [] self.preferred_optimizer = 'scg' # self._set_params(self._get_params()) has been taken out as it should only be called on leaf nodes - def _get_params(self): - raise NotImplementedError, "this needs to be implemented to use the Model class" - def _set_params(self, x): - raise NotImplementedError, "this needs to be implemented to use the Model class" def log_likelihood(self): raise NotImplementedError, "this needs to be implemented to use the Model class" def _log_likelihood_gradients(self): diff --git a/GPy/core/parameterized.py b/GPy/core/parameterized.py index 88625fba..beb7521f 100644 --- a/GPy/core/parameterized.py +++ b/GPy/core/parameterized.py @@ -20,6 +20,11 @@ class Parameterized(object): self.constrained_indices = [] self.constraints = [] + def _get_params(self): + raise NotImplementedError, "this needs to be implemented to use the Model class" + def _set_params(self, x): + raise NotImplementedError, "this needs to be implemented to use the Model class" + def pickle(self, filename, protocol=None): if protocol is None: if self._has_get_set_state():