mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-04-30 07:16:23 +02:00
added ability to handle likelihood with zero variance
This commit is contained in:
parent
aa8b75d0c5
commit
b4a3ac7809
1 changed files with 7 additions and 3 deletions
|
|
@ -51,11 +51,15 @@ class Gaussian(likelihood):
|
|||
return ["noise_variance"]
|
||||
|
||||
def _set_params(self, x):
|
||||
x = float(x)
|
||||
x = np.float64(x)
|
||||
if self._variance != x:
|
||||
self.precision = 1. / x
|
||||
if x == 0.:
|
||||
self.precision = None
|
||||
self.V = None
|
||||
else:
|
||||
self.precision = 1. / x
|
||||
self.V = (self.precision) * self.Y
|
||||
self.covariance_matrix = np.eye(self.N) * x
|
||||
self.V = (self.precision) * self.Y
|
||||
self._variance = x
|
||||
|
||||
def predictive_values(self, mu, var, full_cov):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue