mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-03 08:42:39 +02:00
output_dim instead of input_dim
This commit is contained in:
parent
f60c8ab899
commit
b535cf2e30
1 changed files with 5 additions and 5 deletions
|
|
@ -24,8 +24,8 @@ class Gaussian(likelihood):
|
||||||
# Don't scale outputs which have zero variance to zero.
|
# Don't scale outputs which have zero variance to zero.
|
||||||
self._scale[np.nonzero(self._scale == 0.)] = 1.0e-3
|
self._scale[np.nonzero(self._scale == 0.)] = 1.0e-3
|
||||||
else:
|
else:
|
||||||
self._offset = np.zeros((1, self.input_dim))
|
self._offset = np.zeros((1, self.output_dim))
|
||||||
self._scale = np.ones((1, self.input_dim))
|
self._scale = np.ones((1, self.output_dim))
|
||||||
|
|
||||||
self.set_data(data)
|
self.set_data(data)
|
||||||
|
|
||||||
|
|
@ -35,7 +35,7 @@ class Gaussian(likelihood):
|
||||||
def set_data(self, data):
|
def set_data(self, data):
|
||||||
self.data = data
|
self.data = data
|
||||||
self.N, D = data.shape
|
self.N, D = data.shape
|
||||||
assert D == self.input_dim
|
assert D == self.output_dim
|
||||||
self.Y = (self.data - self._offset) / self._scale
|
self.Y = (self.data - self._offset) / self._scale
|
||||||
if D > self.N:
|
if D > self.N:
|
||||||
self.YYT = np.dot(self.Y, self.Y.T)
|
self.YYT = np.dot(self.Y, self.Y.T)
|
||||||
|
|
@ -68,9 +68,9 @@ class Gaussian(likelihood):
|
||||||
"""
|
"""
|
||||||
mean = mu * self._scale + self._offset
|
mean = mu * self._scale + self._offset
|
||||||
if full_cov:
|
if full_cov:
|
||||||
if self.input_dim > 1:
|
if self.output_dim > 1:
|
||||||
raise NotImplementedError, "TODO"
|
raise NotImplementedError, "TODO"
|
||||||
# Note. for input_dim>1, we need to re-normalise all the outputs independently.
|
# Note. for output_dim>1, we need to re-normalise all the outputs independently.
|
||||||
# This will mess up computations of diag(true_var), below.
|
# This will mess up computations of diag(true_var), below.
|
||||||
# note that the upper, lower quantiles should be the same shape as mean
|
# note that the upper, lower quantiles should be the same shape as mean
|
||||||
# Augment the output variance with the likelihood variance and rescale.
|
# Augment the output variance with the likelihood variance and rescale.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue