From 95948c760ee26034c68b6f97a75307d4dac9c797 Mon Sep 17 00:00:00 2001 From: Arno Solin Date: Thu, 28 Nov 2013 14:11:44 +0200 Subject: [PATCH] fixed bug that prevented the smoother from running. --- GPy/models/state_space.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/GPy/models/state_space.py b/GPy/models/state_space.py index df3201ae..313f4846 100644 --- a/GPy/models/state_space.py +++ b/GPy/models/state_space.py @@ -77,15 +77,15 @@ class StateSpace(Model): #return self.kf_likelihood_g(F,L,Qc,self.sigma2,H,Pinf,dF,dQc,dPinf,self.X,self.Y) return False - def predict_raw(self, Xnew, Y=None, filteronly=False): + def predict_raw(self, Xnew, Ynew=None, filteronly=False): # Set defaults - if Y is None: - Y = self.Y + if Ynew is None: + Ynew = self.Y # Make a single matrix containing training and testing points X = np.vstack((self.X, Xnew)) - Y = np.vstack((Y, np.nan*np.zeros(Xnew.shape))) + Y = np.vstack((Ynew, np.nan*np.zeros(Xnew.shape))) # Sort the matrix (save the order) _, return_index, return_inverse = np.unique(X,True,True) @@ -99,7 +99,7 @@ class StateSpace(Model): (M, P) = self.kalman_filter(F,L,Qc,H,self.sigma2,Pinf,X.T,Y.T) # Run the Rauch-Tung-Striebel smoother - if not filter: + if not filteronly: (M, P) = self.rts_smoother(F,L,Qc,X.T,M,P) # Put the data back in the original order