mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-05 14:55:15 +02:00
Merge branch 'params' of github.com:SheffieldML/GPy into params
Conflicts: GPy/core/gp.py GPy/plotting/matplot_dep/models_plots.py
This commit is contained in:
commit
4ce6d2d72c
34 changed files with 800 additions and 710 deletions
|
|
@ -48,7 +48,7 @@ class GP(Model):
|
|||
self.Y_metadata = None
|
||||
|
||||
assert isinstance(kernel, kern.Kern)
|
||||
assert self.input_dim == kernel.input_dim
|
||||
#assert self.input_dim == kernel.input_dim
|
||||
self.kern = kernel
|
||||
|
||||
assert isinstance(likelihood, likelihoods.Likelihood)
|
||||
|
|
@ -69,6 +69,8 @@ class GP(Model):
|
|||
def parameters_changed(self):
|
||||
self.posterior, self._log_marginal_likelihood, grad_dict = self.inference_method.inference(self.kern, self.X, self.likelihood, self.Y, **self.Y_metadata)
|
||||
self.likelihood.update_gradients(np.diag(grad_dict['dL_dK']), **self.Y_metadata)
|
||||
#self.posterior, self._log_marginal_likelihood, grad_dict = self.inference_method.inference(self.kern, self.X, self.likelihood, self.Y, Y_metadata=self.Y_metadata)
|
||||
#self.likelihood.update_gradients(np.diag(grad_dict['dL_dK']))
|
||||
self.kern.update_gradients_full(grad_dict['dL_dK'], self.X)
|
||||
|
||||
def log_likelihood(self):
|
||||
|
|
@ -186,7 +188,7 @@ class GP(Model):
|
|||
"""
|
||||
assert "matplotlib" in sys.modules, "matplotlib package has not been imported."
|
||||
from ..plotting.matplot_dep import models_plots
|
||||
models_plots.plot_fit_f(self,*args,**kwargs)
|
||||
return models_plots.plot_fit_f(self,*args,**kwargs)
|
||||
|
||||
def plot(self, *args, **kwargs):
|
||||
"""
|
||||
|
|
@ -207,7 +209,7 @@ class GP(Model):
|
|||
"""
|
||||
assert "matplotlib" in sys.modules, "matplotlib package has not been imported."
|
||||
from ..plotting.matplot_dep import models_plots
|
||||
models_plots.plot_fit(self,*args,**kwargs)
|
||||
return models_plots.plot_fit(self,*args,**kwargs)
|
||||
|
||||
def _getstate(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue