himamo v0.1.0 Himamo.Model.B

Defines symbol emission probability distribution.

Symbol emission probability distribution, commonly denoted by B, defines the probability of the model emitting the symbol v_k when in state S_j.

  • 0 ≤ j < N where N is the number of states.
  • 0 ≤ k < M where M is the number of distinct observation symbols, i.e. the alphabet size.

Examples

# Distribution with 3 states and 4 symbols
iex> b = Himamo.Model.B.new(n: 3, m: 4)
...> b = Himamo.Model.B.put(b, {1, 2}, 0.1)
...> Himamo.Model.B.get(b, {1, 2})
0.1

Summary

Functions

Returns probability of emitting symbol v_k when model is in state S_j

Creates a representation of symbol emission probabilities by state (m×n)

Returns total number of states

Updates probability of emitting symbol v_k when model is in state S_j

Types

Functions

get(b, arg)

Returns probability of emitting symbol v_k when model is in state S_j.

new(kwargs)

Specs

new(m: pos_integer, n: pos_integer) :: t

Creates a representation of symbol emission probabilities by state (m×n).

num_states(matrix)

Specs

num_states(t) :: pos_integer

Returns total number of states.

put(b, arg, val)

Updates probability of emitting symbol v_k when model is in state S_j.