mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-04-27 05:46:24 +02:00
Just breaking some things...
This commit is contained in:
parent
2bf1cf0eb6
commit
46d59c94b2
3 changed files with 113 additions and 43 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from scipy.special import gammaln
|
||||
import numpy as np
|
||||
from GPy.likelihoods.likelihood_functions import likelihood_function
|
||||
|
||||
from scipy import stats
|
||||
|
||||
class student_t(likelihood_function):
|
||||
"""Student t likelihood distribution
|
||||
|
|
@ -72,3 +72,17 @@ class student_t(likelihood_function):
|
|||
#hess = ((self.v + 1) * e) / ((((self.sigma**2) * self.v) + e**2)**2)
|
||||
hess = ((self.v + 1) * (e**2 - self.v*(self.sigma**2))) / ((((self.sigma**2) * self.v) + e**2)**2)
|
||||
return hess
|
||||
|
||||
def predictive_values(self, mu, var):
|
||||
"""
|
||||
Compute mean, and conficence interval (percentiles 5 and 95) of the prediction
|
||||
"""
|
||||
mean = np.exp(mu)
|
||||
p_025 = stats.t.ppf(025,mean)
|
||||
p_975 = stats.t.ppf(975,mean)
|
||||
|
||||
#p_025 = tmp[:,0]
|
||||
#p_975 = tmp[:,1]
|
||||
import ipdb; ipdb.set_trace() ### XXX BREAKPOINT
|
||||
return mean,p_025,p_975
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue