diff --git a/GPy/models/state_space.py b/GPy/models/state_space.py index a3055038..1d202fa2 100644 --- a/GPy/models/state_space.py +++ b/GPy/models/state_space.py @@ -19,10 +19,19 @@ class StateSpace(Model): else: self.kern = kernel + #TODO:assert something about the kernel being an AR kernel? + + def set_params(self, x): self.kern.set_params(x[:self.kern.num_params_transformed()]) self.sigma2 = x[-1] + #get the new model matrices from the kernel + + #run the kalman filter + + #run the rts smoother + def get_params(self): return np.append(self.kern.get_params_transformed(), self.sigma2) @@ -32,14 +41,34 @@ class StateSpace(Model): def log_likelihood(self): #TODO - def log_likelihood_gradients(self): + def _log_likelihood_gradients(self): #TODO + dL_dsigma2 = ??? + dL_dtheta = self.kern.dL_dtheta_via_FL(self.dL_dF, self.dL_dL) + return np.hstack((dL_dtheta, dL_dsigma2)) - def predict_raw(self): + def predict_raw(self, Xnew): #TODO + #make a single matrix containing traingin and testing points + + #sort the matrix (save the order + + #run the kalman filter again + + #run the smoother + + #put the data back in the original order, return the posterior of the state def predict(self): #TODO + #run the kalman filter to get the state, add the noise variance to the state variance + def plot(self): #TODO + + def posterior_samples_f(self,X,size=10): + #TODO + + def posterior_samples(self, X, size=10): + #TODO