iekfWPostMode¶
- iekfWPostMode(y, t, is_artifact, m, num_iters, num_particles, verbose)¶
iekfWPostMode estimates a multi-peak, state-space model for a spectrogram using the iterated extended Kalman filter augmented to estimate the discrete transition of the On/Off-peak combination and to draw an improved initial reference trajectory. The difference from iekf is that it uses an approximation to the posterior density to evaluate the draws and select the intial reference trajectory instead of the likelihood. The posterior approximation is an internal function logPostx.
- NOTE: This function explicitly overwrites the state transition by
incorporating the 0.9 factor into Phi and using this Phi for both the state and state-error covariance updates.
- INPUTS:
y – observed spectrogram (dim_y x T) t – time points of spectrogram (1 x T) is_artifact – indicator vector of time points of artifacts (1 x T) m – StateSpaceMultiPeak object containing the model num_iters – positive integer number of iterations.
EKF version given by 1. Default 20.
- num_particles – positive integer number of draws.
Version without draws given by 1. Default 500.
- verbose – flag indicating level of verbosity. Default 2.
0 - no display of progress. 1 - text display of progress 2 - graphical display of fits as it progresses.
- OUTPUTS:
- ss_etim – estimate structure for StateSpaceMultiPeak.
- Contains:
num_particles num_iters xf_hat - filter state estimates (dim_x x T+1) Pf - filter state error covariances (dim_x x dim_x x T+1) yf_hat - filter observation estimates (dim_y x T+1) comps_hat_f - filter component peak estimates (dim_y x T+1) alpha - filter estimate of On/Off-peak combination (num_combos x T+1) xp_hat - prediction state estimates (dim_x x T+1) Pp - prediction state error covariances (dim_x x dim_x x T+1) yp_hat - prediction observation estimates (dim_y x T+1) comps_hat_p - prediction component peak estimates (dim_y x T+1)
Created by Patrick Stokes and Michael Prerau Created on 2017-04-20 Modified on 2017-04-24