mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
Stablised exp link_function and quadrature variances
This commit is contained in:
parent
1ed7d73219
commit
169fd9b8d4
3 changed files with 15 additions and 6 deletions
|
|
@ -6,6 +6,9 @@ from scipy import stats
|
|||
import scipy as sp
|
||||
from GPy.util.univariate_Gaussian import std_norm_pdf,std_norm_cdf,inv_std_norm_cdf
|
||||
|
||||
_exp_lim_val = np.finfo(np.float64).max
|
||||
_lim_val = np.log(_exp_lim_val)
|
||||
|
||||
class GPTransformation(object):
|
||||
"""
|
||||
Link function class for doing non-Gaussian likelihoods approximation
|
||||
|
|
@ -92,16 +95,16 @@ class Log(GPTransformation):
|
|||
|
||||
"""
|
||||
def transf(self,f):
|
||||
return np.exp(f)
|
||||
return np.exp(np.clip(f, -_lim_val, _lim_val))
|
||||
|
||||
def dtransf_df(self,f):
|
||||
return np.exp(f)
|
||||
return np.exp(np.clip(f, -_lim_val, _lim_val))
|
||||
|
||||
def d2transf_df2(self,f):
|
||||
return np.exp(f)
|
||||
return np.exp(np.clip(f, -_lim_val, _lim_val))
|
||||
|
||||
def d3transf_df3(self,f):
|
||||
return np.exp(f)
|
||||
return np.exp(np.clip(f, -_lim_val, _lim_val))
|
||||
|
||||
class Log_ex_1(GPTransformation):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue