An emission table: the probability of each observed value given each value of the state.
More...
|
|
template<MatrixExpression Matrix> |
| | EmissionTable (Space_ space, ObservationSpace_ observations, Matrix &&matrix) |
| | The table over space and observations with emission matrix matrix: nonnegative, with each row summing to one.
|
| Space_ const & | space () const |
| ObservationSpace_ const & | observationSpace () const |
| MatrixType const & | matrix () const |
| Observation | observe (Eigen::Index observed) const & |
|
void | observe (Eigen::Index observed) const &&=delete |
| | observe() of a temporary table is deleted: the observation refers to the table, which would be gone at the end of the full expression (hidden-markov-filter.md Q4).
|
template<DiscreteSpace Space_, DiscreteSpace ObservationSpace_, RealScalar Scalar_ = double>
class Emrys::EmissionTable< Space_, ObservationSpace_, Scalar_ >
An emission table: the probability of each observed value given each value of the state.
The emission matrix \( B \) of a hidden Markov model with a finite observation space (Rabiner (1989), §II), a right stochastic matrix with a row per value of the state and a column per observed value, \( B_{vz} = P(z \mid v) \). The table itself is not an emission model: observe() names what was observed and borrows the table, so a filter updated every step doesn't copy the matrix.
auto const table =
EmissionTable{Weather{}, Activity{}, Eigen::Matrix<double, 2, 3>{{0.1, 0.4, 0.5}, {0.6, 0.3, 0.1}}};
auto const evidence =
update(prior, table.observe(Activity::index<Walk>()));
EmissionTable(Space_ space, ObservationSpace_ observations, Matrix &&matrix)
The table over space and observations with emission matrix matrix: nonnegative, with each row summing...
Definition Emission.h:193
std::expected< CategoricalUpdate< Space, Scalar >, WeightError > update(CategoricalParams< Space, Scalar > const &prior, E const &emission)
Definition Emission.h:97
- Template Parameters
-
| Space_ | the discrete space of the state |
| ObservationSpace_ | the discrete space of the observation |
| Scalar_ | scalar type of the probabilities, double by default |