mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-12 13:32:39 +02:00
[exponential] fixed exponential *2 error
This commit is contained in:
parent
e4d71bc8f6
commit
bfd0ee0db2
2 changed files with 4 additions and 4 deletions
|
|
@ -129,14 +129,14 @@ class sde_Exponential(Exponential):
|
|||
"""
|
||||
|
||||
self.variance.gradient = gradients[0]
|
||||
self.lengthscale.gradient = gradients[1] * 2.0
|
||||
self.lengthscale.gradient = gradients[1]
|
||||
|
||||
def sde(self):
|
||||
"""
|
||||
Return the state space representation of the covariance.
|
||||
"""
|
||||
variance = float(self.variance.values)
|
||||
lengthscale = float(self.lengthscale*2.0)
|
||||
lengthscale = float(self.lengthscale)
|
||||
|
||||
F = np.array(((-1.0/lengthscale,),))
|
||||
L = np.array(((1.0,),))
|
||||
|
|
|
|||
|
|
@ -315,10 +315,10 @@ class Exponential(Stationary):
|
|||
super(Exponential, self).__init__(input_dim, variance, lengthscale, ARD, active_dims, name)
|
||||
|
||||
def K_of_r(self, r):
|
||||
return self.variance * np.exp(-0.5 * r)
|
||||
return self.variance * np.exp(-r)
|
||||
|
||||
def dK_dr(self, r):
|
||||
return -0.5*self.K_of_r(r)
|
||||
return -self.K_of_r(r)
|
||||
|
||||
# def sde(self):
|
||||
# """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue