mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-05 14:55:15 +02:00
Modified logexp transformation to prevent it returning zero when argument is under -36.
This commit is contained in:
parent
c7913b14fd
commit
0f8dbba56d
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ class transformation(object):
|
|||
class logexp(transformation):
|
||||
domain = POSITIVE
|
||||
def f(self, x):
|
||||
return np.where(x>lim_val, x, np.log(1. + np.exp(x)))
|
||||
return np.where(x<-lim_val, np.log(1+np.exp(-lim_val)), np.where(x>lim_val, x, np.log(1. + np.exp(x))))
|
||||
def finv(self, f):
|
||||
return np.where(f>lim_val, f, np.log(np.exp(f) - 1.))
|
||||
def gradfactor(self, f):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue