mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-18 13:55:14 +02:00
Tidying up
This commit is contained in:
parent
5e88a885b1
commit
5a8033b016
2 changed files with 1 additions and 6 deletions
|
|
@ -76,6 +76,7 @@ class Laplace(likelihood):
|
|||
#FIXME: Careful of side effects! And make sure W and K are up to date!
|
||||
d3lik_d3fhat = self.likelihood_function.d3lik_d3f(self.data, self.f_hat)
|
||||
dL_dfhat = -0.5*(np.diag(self.Ki_W_i)[:, None]*d3lik_d3fhat).T
|
||||
import ipdb; ipdb.set_trace() # XXX BREAKPOINT
|
||||
I_KW_i = np.eye(self.N) - np.dot(self.K, self.Wi_K_i)
|
||||
return dL_dfhat, I_KW_i
|
||||
|
||||
|
|
@ -88,7 +89,6 @@ class Laplace(likelihood):
|
|||
|
||||
#Implicit
|
||||
impl = mdot(dlp, dL_dfhat, I_KW_i)
|
||||
#expl_a = mdot(self.Ki_f, self.Ki_f.T)
|
||||
expl_a = np.dot(self.Ki_f, self.Ki_f.T)
|
||||
expl_b = self.Wi_K_i
|
||||
#print "expl_a: {}, expl_b: {}".format(expl_a, expl_b)
|
||||
|
|
|
|||
|
|
@ -286,12 +286,7 @@ class StudentT(LikelihoodFunction):
|
|||
"""
|
||||
assert y.shape == f.shape
|
||||
e = y - f
|
||||
#FIXME: OUT BY SOME FUNCTION OF N, or the fact that we are summing over several things in the objective?
|
||||
dlik_dvar = self.v*(e**2 - self.sigma2)/(2*self.sigma2*(self.sigma2*self.v + e**2))
|
||||
#dlik_dvar = ( 0.5*(1/float(self.sigma2))
|
||||
#-0.5*(self.v + 1)*(-(1/float(self.v))*(e**2)/(1/(float(self.sigma2**2))))
|
||||
#/ (1 + (1/float(self.v))*((e**2)/float(self.sigma2)))
|
||||
#)
|
||||
return np.sum(dlik_dvar) #May not want to sum over all dimensions if using many D?
|
||||
|
||||
def dlik_df_dvar(self, y, f, extra_data=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue