Basics

Common Options

Arguments

NameTypeDefaultDescription
aAbstractVector-Initial probabilities vector
AAbstractMatrix-Transition matrix
LAbstractMatrix-(Log-)likelihoods
rngAbstractRNGGLOBAL_RNGRandom number generator to use
hmmAbstractHMM-HMM model
observationsAbstractVector or AbstractMatrix-T or T x dim(obs)

Keyword Arguments

NameTypeDefaultDescription
loglBoolfalseUse log-likelihoods instead of likelihoods, if set to true
robustBoolfalseTruncate -Inf to eps() and +Inf to prevfloat(Inf) (log(prevfloat(Inf)) in the log. case)

Notations

SymbolSizeDescriptionDefinition
K-Number of states in an HMM_
T-Number of observations_
aKInitial state distribution$\sum_i a_i = 1$
A(K, K)Transition matrix$\sum_j A_{i,j} = 1, \forall i$
BKVector of observation distributions_
zTHidden states vector$z_1 \sim a$, $z_t \sim A_{z_{t-1}\bullet}$
y(T, .)Observations vector$y_t \sim B_{z_t}$
L(T, K)Observations (log-)likelihoods$L(t,i) = p_{B_i}(y_t)$
α(T, K)Forward (filter) probabilities$\alpha(i) = \mathbb{P}(y_{1:t}, z_t = i)$
β(T, K)Backward (smoothed) probabilities$\beta(i) = \mathbb{P}(y_{t+1:T} \,|\, z_t = i)$
γ(T, K)Posterior probabilities (α * β)$\gamma(i) = \mathbb{P}(z_t = i \,|\, y_{1:T})$

Before version 1.0:

SymbolShapeDescription
π0KInitial state distribution
πKxKTransition matrix
DKVector of observation distributions