@staticmethod<EOL><INDENT>def _kalman_prediction_step(k, p_m , p_P, p_dyn_model_callable, calc_grad_log_likelihood=False,<EOL>p_dm = None, p_dP = None):<DEDENT>
<EOL>A = p_dyn_model_callable.Ak(k,p_m,p_P) <EOL>Q = p_dyn_model_callable.Qk(k) <EOL>m_pred = p_dyn_model_callable.f_a(k, p_m, A) <EOL>P_pred = A.dot(p_P).dot(A.T) + Q <EOL>if calc_grad_log_likelihood:<EOL><INDENT>dA_all_params = p_dyn_model_callable.dAk(k) <EOL>dQ_all_params = p_dyn_model_callable.dQk(k) <EOL>param_number = p_dP.shape[<NUM_LIT:2>]<EOL>dm_pred = np.empty(p_dm.shape)<EOL>dP_pred = np.empty(p_dP.shape)<EOL>for j in range(param_number):<EOL><INDENT>dA = dA_all_params[:,:,j]<EOL>dQ = dQ_all_params[:,:,j]<EOL>dP = p_dP[:,:,j]<EOL>dm = p_dm[:,:,j]<EOL>dm_pred[:,:,j] = np.dot(dA, p_m) + np.dot(A, dm)<EOL>dP_pred[:,:,j] = np.dot( dA ,np.dot(p_P, A.T))<EOL>dP_pred[:,:,j] += dP_pred[:,:,j].T<EOL>dP_pred[:,:,j] += np.dot( A ,np.dot(dP, A.T)) + dQ<EOL>dP_pred[:,:,j] = <NUM_LIT:0.5>*(dP_pred[:,:,j] + dP_pred[:,:,j].T) <EOL><DEDENT><DEDENT>else:<EOL><INDENT>dm_pred = None<EOL>dP_pred = None<EOL><DEDENT>return m_pred, P_pred, dm_pred, dP_pred<EOL>
Desctrete prediction function

Input:
    k:int
        Iteration No. Starts at 0. Total number of iterations equal to the
        number of measurements.

    p_m: matrix of size (state_dim, time_series_no)
        Mean value from the previous step. For "multiple time series mode"
        it is matrix, second dimension of which correspond to different
        time series.

    p_P:
        Covariance matrix from the previous step.

    p_dyn_model_callable: class


    calc_grad_log_likelihood: boolean
        Whether to calculate gradient of the marginal likelihood
        of the state-space model. If true then the next parameter must
        provide the extra parameters for gradient calculation.

    p_dm: 3D array (state_dim, time_series_no, parameters_no)
        Mean derivatives from the previous step. For "multiple time series mode"
        it is 3D array, second dimension of which correspond to different
        time series.

    p_dP: 3D array (state_dim, state_dim, parameters_no)
        Mean derivatives from the previous step

Output:
----------------------------
m_pred, P_pred, dm_pred, dP_pred: metrices, 3D objects
    Results of the prediction steps.