mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-10 20:42:39 +02:00
logexp_clipped bounding behaviour
This commit is contained in:
parent
9e83d8162e
commit
a7692678c9
1 changed files with 2 additions and 2 deletions
|
|
@ -49,8 +49,8 @@ class logexp_clipped(transformation):
|
||||||
def f(self, x):
|
def f(self, x):
|
||||||
exp = np.exp(np.clip(x, self.log_min_bound, self.log_max_bound))
|
exp = np.exp(np.clip(x, self.log_min_bound, self.log_max_bound))
|
||||||
f = np.log(1. + exp)
|
f = np.log(1. + exp)
|
||||||
if np.isnan(f).any():
|
# if np.isnan(f).any():
|
||||||
import ipdb;ipdb.set_trace()
|
# import ipdb;ipdb.set_trace()
|
||||||
return f
|
return f
|
||||||
def finv(self, f):
|
def finv(self, f):
|
||||||
return np.log(np.exp(np.clip(f, self.min_bound, self.max_bound)) - 1.)
|
return np.log(np.exp(np.clip(f, self.min_bound, self.max_bound)) - 1.)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue