particleFilter.bestNWeights

Returns particle filter weights that implement an average over the best N particles


Syntax



Description

weights = particleFilter.bestNWeights(sse, N)

Given the sum of squared errors from a particle filter, determine the N particles with the highest weights. Applies equal weighting to these N particles, and 0 weight to all other particles. The weight for each of the N particles will be 1/N and the sum of all weights will be 1.


Input Arguments

sse

numeric matrix [nMembers x nTime]
The sum of squared errors from a particle filter.

N

scalar positive integer
The number of best particles that should receive equal, non-zero weights.

Output Arguments

weights

numeric matrix [nMembers x nTime]
The weight for each particle in each time step.