|
EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
|
The probabilities of a CategoricalParams whose weights define a distribution: a read-only view. More...
#include <EmrysFilter/Distributions/Categorical.h>
Public Types | |
| using | ParamsType = CategoricalParams<Space_, Scalar_> |
| the parameters it reads | |
| using | Scalar = Scalar_ |
| the scalar type of the probabilities | |
| using | SpaceType = Space_ |
| the discrete space | |
| using | ArrayType = typename ParamsType::ArrayType |
| one entry per value, in flat-index order | |
Public Member Functions | |
| Space_ const & | space () const |
| Eigen::Index | cardinality () const |
| auto | logProbabilities () const |
| auto | probabilities () const |
| Scalar | logProbability (Eigen::Index value) const |
| Scalar | probability (Eigen::Index value) const |
| template<typename... Values> requires (sizeof...(Values) > 0) | |
| Scalar | logProbability () const |
| template<typename... Values> requires (sizeof...(Values) > 0) | |
| Scalar | probability () const |
| Scalar | entropy () const |
| Eigen::Index | mostProbable () const |
| template<typename P> | |
| auto | marginal () const |
| template<typename P> | |
| auto | conditional (Eigen::Index value) const |
| template<typename Value> | |
| auto | conditional () const |
Static Public Attributes | |
| static constexpr int | CardinalityAtCompileTime |
| the number of values, or Eigen::Dynamic | |
| static constexpr int | MaxCardinalityAtCompileTime |
| a bound on it, or Eigen::Dynamic | |
| static constexpr bool | IsParams = false |
| a view: it checks its parameters | |
The probabilities of a CategoricalParams whose weights define a distribution: a read-only view.
Obtained from CategoricalParams::toDensity(), which checks the weights once and gives this view the log of their total, so a value's log-probability is its log-weight minus that total and nothing is copied. It checks its parameters for changes, as its copies do: reading it after they have changed is a programmer error (decisions.md [view-stamp]). A Categorical must not outlive its parameters.
A set of values is named by tag: probability<Turn>() is the probability of every value whose Maneuver is Turn, and probability<Turn, Outlier>() of the one value with both.
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
It is 0 for a single certain value and \( \log n \) for the uniform distribution on \( n \) values, the most there is. Its exponential, the perplexity, is the number of equally likely values that would be as uncertain.
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
staticconstexpr |
the number of values, or Eigen::Dynamic
|
staticconstexpr |
a bound on it, or Eigen::Dynamic