Home > vbmeg > functions > tool_box > linear_connectome_dynamics_toolbox > lcd_forward_prediction.m

lcd_forward_prediction

PURPOSE ^

Repeated N-step prediction by MAR dynamics

SYNOPSIS ^

function Jpred = lcd_forward_prediction(conMAR,J,Nstep)

DESCRIPTION ^

 Repeated N-step prediction by MAR dynamics 

 [Input]
 conMAR : concatenated MAR matrix [Nv Nv*Dmax]
 J :  current timeseries [Nv Nt]   
 Nstep  : prediction time step   (1*1) 

 [Output]
 Jpred  : predicted waveforms. Jpred(:,t) is the N-step prediction of 
         J(:,t) (i.e. prediction using J(:,t-Nstep) ) 

 Nv : number of vertex
 Nt : number of time points

 2016/01/28 O.Yamashita

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function Jpred = lcd_forward_prediction(conMAR,J,Nstep)
0002 % Repeated N-step prediction by MAR dynamics
0003 %
0004 % [Input]
0005 % conMAR : concatenated MAR matrix [Nv Nv*Dmax]
0006 % J :  current timeseries [Nv Nt]
0007 % Nstep  : prediction time step   (1*1)
0008 %
0009 % [Output]
0010 % Jpred  : predicted waveforms. Jpred(:,t) is the N-step prediction of
0011 %         J(:,t) (i.e. prediction using J(:,t-Nstep) )
0012 %
0013 % Nv : number of vertex
0014 % Nt : number of time points
0015 %
0016 % 2016/01/28 O.Yamashita
0017 
0018 
0019 [Nv,Nvl] = size(conMAR);
0020 Dmax = Nvl/Nv;
0021 Nt = size(J,2);
0022 
0023 xx0 = zeros(Nv, Nstep+Dmax);
0024 xx = [xx0 J];
0025 
0026 % forward prediction
0027 Jpred = zeros(Nv,Nt);  % Predicted J
0028 
0029 for tt = Nstep+Dmax+1 : Nt+Nstep+Dmax
0030     %fprintf('process time = %03d ...\n',tt-Nstep-Dmax);
0031     x0 = xx(:,tt-Nstep:-1:tt-Nstep-Dmax+1);    % Nv*Dmax
0032     for st = 1 : Nstep
0033         xtmp = conMAR*x0(:);
0034         x0 = [xtmp x0(:,1:Dmax-1)];
0035     end
0036     Jpred(:,tt-Nstep-Dmax) = x0(:,1);   
0037 end
0038

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005