mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-13 05:52:38 +02:00
first attemot at the new constraint framework
This commit is contained in:
parent
50a68e1a65
commit
83510e7515
5 changed files with 129 additions and 218 deletions
|
|
@ -35,6 +35,9 @@ class GP(model):
|
|||
self.N, self.Q = self.X.shape
|
||||
assert isinstance(kernel, kern.kern)
|
||||
self.kern = kernel
|
||||
self.likelihood = likelihood
|
||||
assert self.X.shape[0] == self.likelihood.data.shape[0]
|
||||
self.N, self.D = self.likelihood.data.shape
|
||||
|
||||
# here's some simple normalization for the inputs
|
||||
if normalize_X:
|
||||
|
|
@ -47,12 +50,8 @@ class GP(model):
|
|||
self._Xmean = np.zeros((1, self.X.shape[1]))
|
||||
self._Xstd = np.ones((1, self.X.shape[1]))
|
||||
|
||||
self.likelihood = likelihood
|
||||
# assert self.X.shape[0] == self.likelihood.Y.shape[0]
|
||||
# self.N, self.D = self.likelihood.Y.shape
|
||||
assert self.X.shape[0] == self.likelihood.data.shape[0]
|
||||
self.N, self.D = self.likelihood.data.shape
|
||||
|
||||
self.has_uncertain_inputs = False
|
||||
model.__init__(self)
|
||||
|
||||
def dL_dZ(self):
|
||||
|
|
@ -232,7 +231,7 @@ class GP(model):
|
|||
else:
|
||||
raise NotImplementedError, "Cannot define a frame with more than two input dimensions"
|
||||
|
||||
def plot(self, samples=0, plot_limits=None, which_data='all', which_functions='all', resolution=None, levels=20):
|
||||
def plot(self, samples=0, plot_limits=None, which_data='all', which_parts='all', resolution=None, levels=20):
|
||||
"""
|
||||
TODO: Docstrings!
|
||||
:param levels: for 2D plotting, the number of contour levels to use
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue