API reference

Types

ControlledHiddenMarkovModels.AbstractControlledHiddenMarkovModel — Type
source

Methods

Base.rand — Function
rand(rng, hmm::AbstractHMM, T, par)

Sample a trajectory of length T from hmm with parameters par.

Returns a couple (state_sequence, obs_sequence).

source
Base.rand — Method
rand(rng, hmm::AbstractControlledHMM, control_sequence, par)

Sample a trajectory from hmm with controls control_sequence and parameters par.

Returns a couple (state_sequence, obs_sequence).

source
ControlledHiddenMarkovModels.baum_welch — Method
baum_welch(obs_sequences, hmm_init::HMM[, par; maxiter, tol])

Apply the Baum-Welch algorithm on multiple observation sequences, starting from an initial HMM hmm_init with parameters par (not modifed).

source
ControlledHiddenMarkovModels.fit_mle_from_single_sequence — Method
fit_mle_from_single_sequence(::Type{D}, x, w)

Fit a distribution of type D based on a single sequence of observations x associated with a single sequence of weights w.

Defaults to Distributions.fit_mle, with a special case for vectors of vectors (because Distributions.fit_mle accepts matrices instead). Users are free to override this default for concrete distributions.

source
ControlledHiddenMarkovModels.infer_current_state — Function
infer_current_state(hmm::AbstractControlledHMM, obs_sequence, control_sequence, par; safe)

Infer the posterior distribution of the current state given obs_sequence for hmm with controls control_sequence and parameters par.

source
ControlledHiddenMarkovModels.iszero_safe — Method
iszero_safe(x::R)

Check if a number x is zero by comparing its inverse with typemax(R).

This is useful in the following case:

julia> x = 1e-320
1.0e-320

julia> iszero(x)
false

julia> inv(x)
Inf
source
DensityInterface.logdensityof — Function
logdensityof(hmm::AbstractControlledHMM, obs_sequence, control_sequence, par; safe)

Compute the log likelihood of obs_sequence for hmm with controls control_sequence and parameters par.

source

Index