mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
working on the Poisson likelihood
This commit is contained in:
parent
a66055a45e
commit
8c9d9e7fec
2 changed files with 52 additions and 9 deletions
|
|
@ -21,7 +21,7 @@ class LinkFunction(object):
|
|||
|
||||
class Probit(LinkFunction):
|
||||
"""
|
||||
Probit link function: Squashes a likelihood between 0 and 1
|
||||
Probit link function
|
||||
"""
|
||||
def transf(self,mu):
|
||||
pass
|
||||
|
|
@ -31,3 +31,32 @@ class Probit(LinkFunction):
|
|||
|
||||
def log_inv_transf(self,f):
|
||||
pass
|
||||
|
||||
class Log(LinkFunction):
|
||||
"""
|
||||
Logarithm link function
|
||||
"""
|
||||
|
||||
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
|
||||
|
||||
def inv_transf_df(sefl,f):
|
||||
return np.exp(f)
|
||||
|
||||
def log_inv_transf_df(self,f):
|
||||
return 1
|
||||
|
||||
def inv_transf_df(sefl,f):
|
||||
return np.exp(f)
|
||||
|
||||
def log_inv_transf_df(self,f):
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue