compareEKFs_jobs_wRandSSMs

compareEKFs_jobs_wRandSSMs(odir, sim_type, num_peaks, num_sims, NT, dT, maxF, NF, rand_seeds, num_particles, num_iters, K_lim, T_lim, f_verb)

compareEKFs_jobs_wRandSSMs compares the performance of the variant IEKF filters by generating simulations, estimating all filters on each simulation, and computing a set of 16 statistical measures and tests from the estimates.

NOTE: The first four, primary inputs are as strings to facilitate batch

submission to a cluster (with other inputs as default).

NOTE: This implementation assumes 4 cores available for parallel

processing. This is set in the variable num_cores. It can be increased or decreased as necessary.

Inputs:
odir – string of output directory path where output is saved.

Default is ‘results’.

sim_type – string indicating ‘randWalk’ (default) or ‘pseudoDeterm’. num_peaks – string of integer number of peaks on an exponential-decay background.

Default is ‘1’.

num_sims – string of number of simulations. Default is ‘1’. NT – integer number of time steps for length of the

simulations. Default is 100.

dT – sampling rate of simultion. It is completely arbitrary

and does not affect anything beyond the label of the time bins. Default is 0.005

maxF – positive Nyquist (maximum) frequency of simulations.

Default is 100.

NF – integer number of equally spaced frequency bins

from 0 to maxF. Default is 300.

rand_seeds – an array of 1xnum_simsx10 of random seed values.

The 10 random seed values for each simulation are initializations for 1. the random setting of peak types and frequency ranges, 2. the generation of the simulation, and 3-10. the separate filter estimates. WARNING The re-use of seeds does not appear to work. At some point within the code the seeds are being overridden.

num_particles – an integer number of particle draws to obtain an improved

initial reference trajector. Used in the iekf, iekfW2ndDeriv, and the iekfWPostMode. Basic EKF and IEKF versions obtained by using num_particles=1. Default is 1000.

num_iters – an integer number of iterations used in the iekf,

iekfW2ndDeriv, and the iekfWPostMode. Corresponding EKFs obtained by using num_iters=1. Default is 10.

K_lim – an integer limit on the number on the cross-frequency

correlations evaluated in the checkEstimates computation of iCorr, boxQ, and moranI. Default is 4.

T_lim – an integer limit on the number on the time-lag

correlations evaluated in the checkEstimates computation of boxQ and moranI. Default is 3.

f_verb – integer flag for verbosity of each filter computation.

0 – no text or graphical display of filter progress. 1 – text display of filter progress. 2 – text and graphical display of filter. Default is 0.

Outputs: Outputs are saved to a file in odir.

Output file name is set as [odir ‘/peaks’ num2str(num_peaks) ‘_’ curr_date_str ‘.mat’]; stats – 8x16xnum_sims array of stats for each filter

estimate of each simulation. There are 16 statistical measures computed for each of the 8 filters on each simulation.

rand_seeds – array of generated random seeds. WARNING as mentioned

above the re-use of the random seeds does not appear functional at this time.

Some of the input settings are also saved.

Created – Patrick Stokes