getProbableValues
public static java.util.List<ParticleFilter.Particle> getProbableValues(java.util.Collection<? extends Vertex> vertices,
int numParticles,
int resamplingCycles,
double resamplingProportion,
KeanuRandom random)
A particle filtering approach is used to find probable values for the latent vertices of a Bayesian network,
given a set of observed vertices. This is done by incrementally increasing the proportion of the graph under
consideration, randomly sampling values for newly added latent variables at each stage. Each increment
involves the addition of one new observed vertex and the latent vertices that it depend on. This is done for a
specified number of 'particles', each of which represents one set of randomly sampled values of the latent
vertices in the Bayesian network and has an associated probability. As the proportion of the graph under
consideration incrementally grows, less probable particles are culled and more probable particles are duplicated,
resulting in a final set of relatively probable particles.
This methodology is similar to the Sequential Importance Resampling Algorithm described here
(https://www.lancaster.ac.uk/pg/turnerl/PartileFiltering.pdf).
- Parameters:
vertices
- the vertices of a Bayesian network to find probable values for
numParticles
- the number of particles to generate (a larger number will yield better results but is more
computationally expensive)
resamplingCycles
- the number of times low probability particles are culled and high probability particles
are replicated each time the subgraph under consideration is expanded
resamplingProportion
- the proportion of particles to cull (e.g. the 25% of least probably particles could
be culled)
random
- a random number generator
- Returns:
- a list of particles representing the most probable found values of latent variables