ModErn Text Analysis
META Enumerates Textual Applications
|
Probability distributions and other statistics functions. More...
Classes | |
class | dirichlet |
Represents a Dirichlet distribution. More... | |
class | multinomial |
Represents a multinomial/categorical distribution. More... | |
Functions | |
template<class T > | |
multinomial< T > | operator+ (const multinomial< T > &lhs, const multinomial< T > &rhs) |
template<class T > | |
multinomial< T > | operator+ (multinomial< T > &&lhs, const multinomial< T > &rhs) |
template<class T > | |
multinomial< T > | operator+ (const multinomial< T > &lhs, multinomial< T > &&rhs) |
template<class T > | |
multinomial< T > | operator+ (multinomial< T > &&lhs, multinomial< T > &&rhs) |
template<class Dist , class Fun > | |
double | expected_value (Dist &&dist, Fun &&fun) |
Computation for \(E_d[f(x)]\) where \(d\) is specified by the dist parameter and \(f(x)\) is the fun parameter. More... | |
template<class Dist > | |
double | entropy (Dist &&dist) |
Computes the entropy \(H(X) = - \sum_{x \in X} p(x) \log_2 p(x)\). More... | |
Probability distributions and other statistics functions.
double meta::stats::expected_value | ( | Dist && | dist, |
Fun && | fun | ||
) |
Computation for \(E_d[f(x)]\) where \(d\) is specified by the dist
parameter and \(f(x)\) is the fun
parameter.
dist
must be a distribution over input type accepted by f.
dist | The distribution the expectation should be calculated against |
fun | The function to compute the expectation of |
double meta::stats::entropy | ( | Dist && | dist | ) |
Computes the entropy \(H(X) = - \sum_{x \in X} p(x) \log_2 p(x)\).
dist | The distribution to compute the entropy over |