EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emission.h File Reference

The measurement of a discrete state: the EmissionModel concept, which fills one log-likelihood per value; update() of a CategoricalParams by one, returning its CategoricalUpdate; the emission models EmissionTable, DensityEmission, PoissonEmission, and ExponentialEmission; and ArrivalInterval, the exact observation of a Markov-modulated Poisson process over a ContinuousTimeMarkovChain's interval, with its predict() (decisions.md [emissions]). More...

#include <concepts>
#include <expected>
#include <type_traits>
#include <utility>
#include <EmrysFilter/Core/Forwarding.h>
#include <EmrysFilter/Core/Macros.h>
#include <EmrysFilter/Core/Math.h>
#include <EmrysFilter/Core/Multiply.h>
#include <EmrysFilter/Core/Time.h>
#include <EmrysFilter/Core/Weights.h>
#include <EmrysFilter/Distributions/Categorical.h>
#include <EmrysFilter/Distributions/ContinuousTimeMarkovChain.h>
#include <EmrysFilter/Spaces/Discrete.h>
#include <EmrysFilter/Spaces/Space.h>

Go to the source code of this file.

Classes

struct  Emrys::CategoricalUpdate< Space, Scalar >
 The result of updating a CategoricalParams by an emission model: the posterior, whose weights sum to one, and the log-evidence of the measurement. More...
class  Emrys::EmissionTable< Space_, ObservationSpace_, Scalar_ >
 An emission table: the probability of each observed value given each value of the state. More...
class  Emrys::EmissionTable< Space_, ObservationSpace_, Scalar_ >::Observation
 The emission model of one observed value: the column of the table it selects. More...
class  Emrys::DensityEmission< Observation, DistributionOf >
 The emission model of an observation drawn from a distribution chosen by the value: the log-density of the observation under the value's distribution. More...
class  Emrys::PoissonEmission< Space, Scalar_ >
 The emission model of a count of events over an interval, from a Poisson process whose rate is a function of the value. More...
class  Emrys::ExponentialEmission< Space, Scalar_ >
 The emission model of the time from one event to the next, from a Poisson process whose rate is a function of the value. More...
class  Emrys::ArrivalInterval< Space, Scalar_ >
 The observation of a Markov-modulated Poisson process over an interval: no event inside it, and an event at its end unless it closes the record. More...

Concepts

concept  Emrys::EmissionModel
 A measurement of a value in the discrete space Space: one log-likelihood per value.

Typedefs

template<DiscreteSpace Space, typename Scalar>
using Emrys::EmissionBuffer = Eigen::Ref<Eigen::Array<Scalar, Space::Cardinality, 1>>
 The buffer an emission model writes its log-likelihoods into: one coefficient per value of the discrete space Space, with as many rows at compile time as Space has values, so that a model over a space of fixed cardinality writes a fixed-size array.

Functions

template<typename Scalar, typename Space, EmissionModel< Space > E>
std::expected< CategoricalUpdate< Space, Scalar >, WeightError > Emrys::update (CategoricalParams< Space, Scalar > const &prior, E const &emission)
template<typename Scalar, typename Space>
std::expected< CategoricalUpdate< Space, Scalar >, WeightError > Emrys::predict (CategoricalParams< Space, Scalar > const &prior, ContinuousTimeMarkovChain< Space, Scalar > const &chain, TimeStep< Scalar > auto const &dt, ArrivalInterval< Space, Scalar > const &interval)

Detailed Description

The measurement of a discrete state: the EmissionModel concept, which fills one log-likelihood per value; update() of a CategoricalParams by one, returning its CategoricalUpdate; the emission models EmissionTable, DensityEmission, PoissonEmission, and ExponentialEmission; and ArrivalInterval, the exact observation of a Markov-modulated Poisson process over a ContinuousTimeMarkovChain's interval, with its predict() (decisions.md [emissions]).

Read Distributions/ContinuousTimeMarkovChain.h first, and Filters/HiddenMarkovFilter.h next.