mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
Merge branch 'newGP' of github.com:SheffieldML/GPy into newGP
Conflicts: GPy/likelihoods/EP.py GPy/likelihoods/likelihood_functions.py
This commit is contained in:
commit
879fa138e1
7 changed files with 464 additions and 369 deletions
|
|
@ -1,7 +1,9 @@
|
|||
import numpy as np
|
||||
from likelihood import likelihood
|
||||
|
||||
class Gaussian:
|
||||
class Gaussian(likelihood):
|
||||
def __init__(self,data,variance=1.,normalize=False):
|
||||
self.is_heteroscedastic = False
|
||||
self.data = data
|
||||
self.N,D = data.shape
|
||||
self.Z = 0. # a correction factor which accounts for the approximation made
|
||||
|
|
@ -19,6 +21,7 @@ class Gaussian:
|
|||
self.YYT = np.dot(self.Y,self.Y.T)
|
||||
self._set_params(np.asarray(variance))
|
||||
|
||||
|
||||
def _get_params(self):
|
||||
return np.asarray(self._variance)
|
||||
|
||||
|
|
@ -27,7 +30,8 @@ class Gaussian:
|
|||
|
||||
def _set_params(self,x):
|
||||
self._variance = x
|
||||
self.variance = np.eye(self.N)*self._variance
|
||||
self.covariance_matrix = np.eye(self.N)*self._variance
|
||||
self.precision = 1./self._variance
|
||||
|
||||
def predictive_values(self,mu,var):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue