mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
Used scipy.log1p since it gives more consistent results cross-platform
This commit is contained in:
parent
b837525baa
commit
fb444d8933
1 changed files with 3 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
# Licensed under the BSD 3-clause license (see LICENSE.txt)
|
# Licensed under the BSD 3-clause license (see LICENSE.txt)
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
import scipy
|
||||||
from ..util.univariate_Gaussian import std_norm_cdf, std_norm_pdf
|
from ..util.univariate_Gaussian import std_norm_cdf, std_norm_pdf
|
||||||
import scipy as sp
|
import scipy as sp
|
||||||
from ..util.misc import safe_exp, safe_square, safe_cube, safe_quad, safe_three_times
|
from ..util.misc import safe_exp, safe_square, safe_cube, safe_quad, safe_three_times
|
||||||
|
|
@ -67,7 +68,7 @@ class Probit(GPTransformation):
|
||||||
.. math::
|
.. math::
|
||||||
|
|
||||||
g(f) = \\Phi^{-1} (mu)
|
g(f) = \\Phi^{-1} (mu)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def transf(self,f):
|
def transf(self,f):
|
||||||
return std_norm_cdf(f)
|
return std_norm_cdf(f)
|
||||||
|
|
@ -140,7 +141,7 @@ class Log_ex_1(GPTransformation):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def transf(self,f):
|
def transf(self,f):
|
||||||
return np.log1p(safe_exp(f))
|
return scipy.log1p(safe_exp(f))
|
||||||
|
|
||||||
def dtransf_df(self,f):
|
def dtransf_df(self,f):
|
||||||
ef = safe_exp(f)
|
ef = safe_exp(f)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue