I'll preface this question by saying that it may be a misunderstanding of particle filtering on my behalf rather than any problem with the IVT. However, the following has left me a little confused. Perhaps someone can offer comment?

Here is the PickBaseSample() function reproduced from IVT/src/ParticleFilter/ParticleFilterFramework.cpp:

int CParticleFilterFramework::PickBaseSample()

{

double choice = uniform_random() * c_total;

int low = 0;

int high = m_nParticles;

while (high > (low + 1))

{

int middle = (high + low) / 2;

if (choice > c[middle])

low = middle;

else

high = middle;

}

return low;

}

This function is used by PredictNewBases to choose particles from the last distribution. The particle position then has drift and noise applied to give a new position, in this way we can produce our new particle distribution. A random number and the value of c[middle] is used in order to select the particle.

It was my understanding that particles should be sampled from the 'old' distribution with likelihood proportional to their last fitness function score, or weight. However, having updated the particle weights (stored in pi[]), the ParticleFilter() function updates the array c[] as follows:

c_total = 0;

for (i = 0; i < m_nParticles; i++)

{

c[i] = c_total;

c_total += pi[i];

}

That is, for each particle i the value of c[i] is the sum of the weights (fitness function scores) of all particles with a lower index value, j<i. But is it not true that there is no relationship between a particle's index and it's weight, or it's postition in the feature space?

Why do we use the particle index as a way to group scores? And how does this provide a measure that allows PickBaseSample to chose an appropriate particle from the last distribution?

-JD