From bfd0ee0db244ed98d205aa8438324f7f03ccb425 Mon Sep 17 00:00:00 2001 From: mzwiessele Date: Thu, 7 Apr 2016 07:42:12 +0100 Subject: [PATCH] [exponential] fixed exponential *2 error --- GPy/kern/src/sde_stationary.py | 4 ++-- GPy/kern/src/stationary.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GPy/kern/src/sde_stationary.py b/GPy/kern/src/sde_stationary.py index 8e7ad6f5..3ac5f402 100644 --- a/GPy/kern/src/sde_stationary.py +++ b/GPy/kern/src/sde_stationary.py @@ -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,),)) diff --git a/GPy/kern/src/stationary.py b/GPy/kern/src/stationary.py index 30116519..5e137abb 100644 --- a/GPy/kern/src/stationary.py +++ b/GPy/kern/src/stationary.py @@ -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): # """