ChainModels.KChainModel — TypeKChainModel{T,L} <: DiscreteMultivariateDistributionA type to represent a discrete multivariate probability distribution factorized on a one-dimensional chain of length L.
FIELDS
fa vector containing the factors as arrays
ChainModels.accumulate_left! — Methodaccumulate_left!(l, f::AbstractVector{<:AbstractArray{<:Real,K}}) where {K}In-place version of accumulate_left
ChainModels.accumulate_left — Methodaccumulate_left(f::Vector{Matrix{T}}) where {T<:Real}Compute the left partial normalization for the matrices in f
\[\]
ChainModels.accumulate_middle! — Methodaccumulate_middle!(l, f::Vector{Matrix{T}}) where {T<:Real}In-place version of accumulate_middle
ChainModels.accumulate_middle — Methodaccumulate_middle(f::Vector{Matrix{T}}) where {T<:Real}Compute the middle partial normalization for the matrices in f
\[m_{i,j}(x_i,x_j) = \log\sum\limits_{x_{i+1},\ldots,x_{j-1}}\prod\limits_{k=i}^{j-1} e^{f_k(x_k,x_{k+1})}\]
ChainModels.accumulate_right! — Methodaccumulate_right!(l, f::AbstractVector{<:AbstractArray{<:Real,K}}) where {K}In-place version of accumulate_right
ChainModels.accumulate_right — Methodaccumulate_right(f::Vector{Matrix{T}}) where {T<:Real}Compute the right partial normalization for the matrices in f
\[\]
ChainModels.evaluate — Methodevaluate(chain::ChainModel, x)Evaluate the (possibly unnormalized) model at x
ChainModels.lognormalization — Methodlognormalization(chain::ChainModel; l = accumulate_left(chain))Conceptually equivalent to log(normalization(chain)), less prone to numerical issues
ChainModels.nstates — Methodnstates(f::AbstractVector{<:AbstractArray{<:Real}})Returns an iterator with the number of values each variable can take.
ChainModels.rand_kchain_model — Methodrand_kchain_model([rng], K::Integer, L::Integer, q::Integer)Return a KChainModel of length L and q states for each variable, with random entries