Package BIP :: Package SMC :: Module condensation :: Class Model
[hide private]
[frames] | no frames]

Class Model

source code


Example Model Specification
Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
setupPriorConditions(self) source code
 
iterate(self, previous, process)
The process model for a first-order auto-regressive process is:
source code
 
predictSamplePosition(self, new_sample, old_sample)
This routine samples from the distribution
source code
 
evaluateObservationDensity(self, new_sample)
This routine evaluates the observation density
source code
 
obtainObservations(self)
In a real implementation, this routine would go and actually make measurements and store them in the data.meas structure.
source code
 
display(self, iteration) source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

iterate(self, previous, process)

source code 

The process model for a first-order auto-regressive process is:

x_{t+1} - mean = (x_t - mean)*scaling + sigma*w_t

where w_t is unit iid Gaussian noise.

Parameters:
  • previous - previous data
  • process - processmodel parameter tuple

predictSamplePosition(self, new_sample, old_sample)

source code 

This routine samples from the distribution

p(x_t | x_{t-1} = oldpos[old_sample])

and stores the result in new_positions[new_sample]. This is straightforward for the simple first-order auto-regressive process model used here, but any model could be substituted.

evaluateObservationDensity(self, new_sample)

source code 

This routine evaluates the observation density

p(z_t|x_t = newpos[new_sample])

The observation model in this implementation is a simple mixture of Gaussians, where each simulated object is observed as a 1d position and measurement noise is represented as Gaussian. For a visual-tracking application, this routine would go and evaluate the likelihood that the object is present in the image at the position encoded by new_positions[new_sample].

obtainObservations(self)

source code 
In a real implementation, this routine would go and actually make measurements and store them in the data.meas structure. This simulation consists of an object moving around obeying a first-order auto-regressive process, and being observed with its true positions coorrupted by Gaussian measurement noise. Accordingly, this routine calculates the new simulated true and measured position of the object.