mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
removing unused link_functions
This commit is contained in:
parent
adf2594677
commit
feb7b04c51
1 changed files with 7 additions and 33 deletions
|
|
@ -19,41 +19,15 @@ class LinkFunction(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class Identity(LinkFunction):
|
|
||||||
def transf(self,mu):
|
|
||||||
return mu
|
|
||||||
|
|
||||||
def inv_transf(self,f):
|
|
||||||
return f
|
|
||||||
|
|
||||||
def log_inv_transf(self,f):
|
|
||||||
return np.log(f)
|
|
||||||
|
|
||||||
class Log(LinkFunction):
|
|
||||||
|
|
||||||
def transf(self,mu):
|
|
||||||
return np.log(mu)
|
|
||||||
|
|
||||||
def inv_transf(self,f):
|
|
||||||
return np.exp(f)
|
|
||||||
|
|
||||||
def log_inv_transf(self,f):
|
|
||||||
return f
|
|
||||||
|
|
||||||
class Log_ex_1(LinkFunction):
|
|
||||||
def transf(self,mu):
|
|
||||||
return np.log(np.exp(mu) - 1)
|
|
||||||
|
|
||||||
def inv_transf(self,f):
|
|
||||||
return np.log(np.exp(f)+1)
|
|
||||||
|
|
||||||
def log_inv_tranf(self,f):
|
|
||||||
return np.log(np.log(np.exp(f)+1))
|
|
||||||
|
|
||||||
class Probit(LinkFunction):
|
class Probit(LinkFunction):
|
||||||
|
"""
|
||||||
|
Probit link function: Squashes a likelihood between 0 and 1
|
||||||
|
"""
|
||||||
|
def transf(self,mu):
|
||||||
|
pass
|
||||||
|
|
||||||
def inv_transf(self,f):
|
def inv_transf(self,f):
|
||||||
return std_norm_cdf(f)
|
pass
|
||||||
|
|
||||||
def log_inv_transf(self,f):
|
def log_inv_transf(self,f):
|
||||||
return np.log(std_norm_cdf(f))
|
pass
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue