Package trunk :: Package BIP :: Package SMC :: Module condensation :: Class Condensation
[hide private]

Class Condensation

source code

object --+
         |
        Condensation

Instance Methods [hide private]
 
__init__(self, model)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
pickBaseSample(self)
This is binary search using cumulative probabilities to pick a base sample. The use of this routine makes Condensation O(NlogN) where N is the number of samples. It is probably better to pick base samples deterministically, since then the algorithm is O(N) and probably marginally more efficient, but this routine is kept here for conceptual simplicity and because it maps better to the published literature.
source code
 
predictNewBases(self)
This method computes all of the new (unweighted) sample positions. For each sample, first a base is chosen, then the new sample position is computed by sampling from the prediction density p(x_t|x_t-1 = base). predict_sample_position is obviously model-dependent and is found in Model, but it can be replaced by any process model required.
source code
 
runFilter(self) source code
 
calculateBaseWeights(self)
Once all the unweighted sample positions have been computed using predict_new_bases, this routine computes the weights by evaluating the observation density at each of the positions. Cumulative probabilities are also computed at the same time, to permit an efficient implementation of pick_base_sample using binary search. evaluate_observation_density is obviously model-dependent and is found in the Model class, but it can be replaced by any observation model required.
source code
 
updateAfterIterating(self, iteration)
Go and output the estimate for this iteration (which is a model-dependent routine found in Model) and then swap over the arrays ready for the next iteration.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, model)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)