def _raw_predict(self, Xnew=None, Ynew=None, filteronly=False, p_balance=False, **kw):
<EOL>if Ynew is None:<EOL><INDENT>Ynew = self.Y<EOL><DEDENT>if Xnew is not None:<EOL><INDENT>X = np.vstack((self.X, Xnew))<EOL>Y = np.vstack((Ynew, np.nan*np.zeros(Xnew.shape)))<EOL>predict_only_training = False<EOL><DEDENT>else:<EOL><INDENT>X = self.X<EOL>Y = Ynew<EOL>predict_only_training = True<EOL><DEDENT>_, return_index, return_inverse = np.unique(X,True,True)<EOL>X = X[return_index] <EOL>Y = Y[return_index]<EOL>(F,L,Qc,H,P_inf, P0, dF,dQc,dP_inf,dP0) = self.kern.sde()<EOL>state_dim = F.shape[<NUM_LIT:0>]<EOL>if (p_balance==True):<EOL><INDENT>(F,L,Qc,H,P_inf,P0, dF,dQc,dP_inf,dP0) = ssm.balance_ss_model(F,L,Qc,H,P_inf,P0, dF,dQc,dP_inf, dP0)<EOL>print("<STR_LIT>")<EOL><DEDENT>kalman_filter_type = self.kalman_filter_type<EOL>(M, P, log_likelihood,<EOL>grad_log_likelihood,SmootherMatrObject) = ssm.ContDescrStateSpace.cont_discr_kalman_filter(<EOL>F,L,Qc,H,float(self.Gaussian_noise.variance),P_inf,X,Y,m_init=None,<EOL>P_init=P0, p_kalman_filter_type = kalman_filter_type,<EOL>calc_log_likelihood=False,<EOL>calc_grad_log_likelihood=False)<EOL><INDENT>(filter_means, filter_covs, log_likelihood,<EOL>grad_log_likelihood,SmootherMatrObject) = ssm.ContDescrStateSpace.cont_discr_kalman_filter(F,L,Qc,H,<EOL>float(self.Gaussian_noise.variance),P_inf,self.X,self.Y,m_init=None,<EOL>P_init=P0, p_kalman_filter_type = kalman_filter_type, calc_log_likelihood=True,<EOL>calc_grad_log_likelihood=True,<EOL>grad_params_no=grad_params_no,<EOL>grad_calc_params=grad_calc_params)<EOL><DEDENT>if not filteronly:<EOL><INDENT>(M, P) = ssm.ContDescrStateSpace.cont_discr_rts_smoother(state_dim, M, P,<EOL>p_dynamic_callables=SmootherMatrObject, X=X, F=F,L=L,Qc=Qc)<EOL><DEDENT>M = M[<NUM_LIT:1>:,:,:]<EOL>P = P[<NUM_LIT:1>:,:,:]<EOL>M = M[return_inverse,:,:]<EOL>P = P[return_inverse,:,:]<EOL>if not predict_only_training:<EOL><INDENT>M = M[self.num_data:,:,:]<EOL>P = P[self.num_data:,:,:]<EOL><DEDENT>m = np.einsum('<STR_LIT>', M, H)<EOL>m.shape = (m.shape[<NUM_LIT:0>], m.shape[<NUM_LIT:1>]) <EOL>V = np.einsum('<STR_LIT>', H, P, H.T)<EOL>V.shape = (V.shape[<NUM_LIT:0>], V.shape[<NUM_LIT:1>]) <EOL>return (m, V)<EOL>
Performs the actual prediction for new X points.
Inner function. It is called only from inside this class.

Input:
---------------------

Xnews: vector or (n_points,1) matrix
    New time points where to evaluate predictions.

Ynews: (n_train_points, ts_no) matrix
    This matrix can substitude the original training points (in order
    to use only the parameters of the model).

filteronly: bool
    Use only Kalman Filter for prediction. In this case the output does
    not coincide with corresponding Gaussian process.

balance: bool
    Whether to balance or not the model as a whole

Output:
--------------------

m: vector
    Mean prediction

V: vector
    Variance in every point