mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-15 06:52:39 +02:00
_get/set_params into parameterized
This commit is contained in:
parent
d978d3e390
commit
146dff7cbf
2 changed files with 5 additions and 4 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue