blog
Class Particle
java.lang.Object
blog.Particle
public class Particle
- extends java.lang.Object
A Particle for Particle Filtering.
The particle is advanced as it receives evidence and queries with calls to methods take(Evidence)
and answerQueries(Collection)
.
Providing evidence also reweights the particle according to it.
A method copy()
can be used for resampling.
Constructor Summary |
Particle(java.util.Set idTypes,
int numTimeSlicesInMemory)
Creates a new particle. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
numTimeSlicesInMemory
public int numTimeSlicesInMemory
Particle
public Particle(java.util.Set idTypes,
int numTimeSlicesInMemory)
- Creates a new particle.
numTimeSlicesInMemory
indicates how many time slices need to be kept in memory.
The properties table specifies configuration parameters.
take
public void take(Evidence evidence)
- Takes evidence relative to some new time step,
updates current world based on it,
and recalculates particle weight according to its probability.
answerQueries
public void answerQueries(java.util.Collection queries)
- Takes a collection of queries and answers them based on current world.
getLatestWorld
public PartialWorld getLatestWorld()
getLatestWeight
public double getLatestWeight()
copy
public Particle copy()
setWorld
protected void setWorld(PartialWorld curWorld)
updateQueriesStats
public void updateQueriesStats(java.util.Collection queries)