mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-11 15:15:15 +02:00
Changes to symbolic.
This commit is contained in:
parent
505e5e9210
commit
b502efb1c5
1 changed files with 14 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from sympy import Function, S, oo, I, cos, sin, asin, log, erf,pi,exp
|
||||
from sympy import Function, S, oo, I, cos, sin, asin, log, erf,pi,exp, sqrt
|
||||
|
||||
|
||||
class ln_diff_erf(Function):
|
||||
|
|
@ -22,6 +22,19 @@ class ln_diff_erf(Function):
|
|||
class sim_h(Function):
|
||||
nargs = 5
|
||||
|
||||
def fdiff(self, argindex=5):
|
||||
t, tprime, d_i, d_j, l = self.args
|
||||
if argindex == 5:
|
||||
return -2*sin(t)
|
||||
elif argindex == 4:
|
||||
return 2*exp(d_i)
|
||||
elif argindex == 3:
|
||||
return 4*exp(d_j)
|
||||
elif argindex == 2:
|
||||
return 3*exp(l)
|
||||
elif argindex == 1:
|
||||
return 2*d_j
|
||||
|
||||
@classmethod
|
||||
def eval(cls, t, tprime, d_i, d_j, l):
|
||||
return exp((d_j/2*l)**2)/(d_i+d_j)*(exp(-d_j*(tprime - t))*(erf((tprime-t)/l - d_j/2*l) + erf(t/l + d_j/2*l)) - exp(-(d_j*tprime + d_i))*(erf(tprime/l - d_j/2*l) + erf(d_j/2*l)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue