mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-05 14:55:15 +02:00
Basic sim code functional.
This commit is contained in:
parent
fe30db1331
commit
da2a88826d
4 changed files with 62 additions and 23 deletions
|
|
@ -22,9 +22,19 @@ class ln_diff_erf(Function):
|
|||
class sim_h(Function):
|
||||
nargs = 5
|
||||
|
||||
def fdiff(self, argindex=1):
|
||||
pass
|
||||
|
||||
@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)))
|
||||
# putting in the is_Number stuff forces it to look for a fdiff method for derivative.
|
||||
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))))
|
||||
|
||||
class erfc(Function):
|
||||
nargs = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue