From 5cb22090ba69519ec99a640877498aaed0383b47 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 23 Aug 2016 11:19:27 -0500 Subject: [PATCH] removed Logsumexp() from LogisticBasisFuncKernel, allowing slope parameter to be negative. Also removed unnecessary scipy import --- GPy/kern/src/basis_funcs.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/GPy/kern/src/basis_funcs.py b/GPy/kern/src/basis_funcs.py index 7a5f84dd..654d42f2 100644 --- a/GPy/kern/src/basis_funcs.py +++ b/GPy/kern/src/basis_funcs.py @@ -142,15 +142,14 @@ class LogisticBasisFuncKernel(BasisFuncKernel): self.centers = np.atleast_2d(centers) self.ARD_slope = ARD_slope if self.ARD_slope: - self.slope = Param('slope', slope * np.ones(self.centers.size), Logexp()) + self.slope = Param('slope', slope * np.ones(self.centers.size)) else: - self.slope = Param('slope', slope, Logexp()) + self.slope = Param('slope', slope) super(LogisticBasisFuncKernel, self).__init__(input_dim, variance, active_dims, ARD, name) self.link_parameter(self.slope) @Cache_this(limit=3, ignore_args=()) def _phi(self, X): - import scipy as sp phi = 1/(1+np.exp(-((X-self.centers)*self.slope))) return np.where(np.isnan(phi), 0, phi)#((phi-self.start)/(self.stop-self.start))-.5