mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-05 14:55:15 +02:00
fixed bug that prevented the smoother from running.
This commit is contained in:
parent
5fc80202ab
commit
95948c760e
1 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue