mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
some tidying in the likelihood classes
This commit is contained in:
parent
3a558d8244
commit
7dfbcebb87
6 changed files with 364 additions and 369 deletions
|
|
@ -2,6 +2,7 @@ import numpy as np
|
|||
|
||||
class Gaussian:
|
||||
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 +20,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 +29,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 fit(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue