The class Observation
implements classes which define an observation.
The ObservationInteger
class holds integer observations. To be useful, each kind of observation should have at least one observation probability distribution function (e.g. OpdfInteger
in this case).
The ObservationDiscrete
class holds observations whose values are taken out of a finite set; it matches the distribution OpdfDiscrete
.
The ObservationReal
class holds real observations (implemented as a double
). It can be used together with the class OpdfGaussian
(resp. OpdfGaussianMixture
), which implements a Gaussian (resp. Gaussian mixture) distribution.
The ObservationVector
class holds vector of reals (implemented as double
s). It can be used together with the class OpdfMultiGaussian
, which implements a multivariate gaussian distribution[3].
A sequence of observations is simply implemented as a Vector
of Observation
s. A set of observation sequences is implemented using a Vector
of such Vector
s.
The probability of an observation sequence given a HMM can be computed using the HMM class's probability
and lnProbability
methods (one can also directly instanciate the ForwardBackwardCalculator
class or its scaled version, ForwardBackwardScaledCalculator
, so as to avoid underflows with long sequences).