the generalized multiplicative matrix (combining transition probabilities, emission probabilities and observations). If only accumulation is used, set this to 1.0.
the generalized accumulative matrix (combining transition probabilities, emission probabilities and observations). If only multiplication is used, set this to provide the initial state (see above), followed either by zeroes or by terminating the signal.
the number of different states, as reflected by the inner dimensions of matrices
mul
and add
.
the number of observations. If -1
, the UGen runs until the input
is exhausted. This happens when both mul
and add
end.
see StrongestLocalMaxima
see PitchesToViterbi
the generalized accumulative matrix (combining transition probabilities, emission probabilities and observations).
the generalized accumulative matrix (combining transition probabilities, emission probabilities and observations). If only multiplication is used, set this to provide the initial state (see above), followed either by zeroes or by terminating the signal.
Abstract method which must be implemented by creating the actual UGen
s
during expansion.
the generalized multiplicative matrix (combining transition probabilities, emission probabilities and observations).
the generalized multiplicative matrix (combining transition probabilities, emission probabilities and observations). If only accumulation is used, set this to 1.0.
the number of observations.
the number of observations. If -1
, the UGen runs until the input
is exhausted. This happens when both mul
and add
end.
see StrongestLocalMaxima
see PitchesToViterbi
the number of different states, as reflected by the inner dimensions of matrices
mul
and add
.
A UGen performing a generalized Viterbi algorithm. The Viterbi algorithm tries to find the best path among sequences of states, by evaluating transition probabilities. It runs over a predefined number of frames, accumulating data of different states. It maximizes the likelihood of the terminal state, and then backtracks to reconstruct the likely path (sequence of states). The output is the sequence of state indices (from zero inclusive to
numStates
exclusive).Note: This UGen must run until
numFrames
or the inputs are exhausted, before it can begin outputting values.This implementation is generalized in the sense that instead of the canonical matrices "sequences of observations", "initial probabilities", "transition matrix", and "emission matrix", it takes two large matrices
mul
andadd
that contain the equivalent information. These two matrices allow the UGen to operate in two different modes:- multiplicative (as in the Wikipedia article) by damping the probabilities over time - accumulative (as used in Praat for pitch tracking) by adding up the weights (if you have "costs", feed in their negative values).
Basically the internal delta matrix is created by the update function
delta = (delta_prev * mul) + add
(with the corresponding matrix indices).The initial delta state is zero. Therefore, in order to provide the initial state, you obtain an initial vector
v
by providing anadd
matrix ofnumStates x numStates
cells, which is zero except for the first column filled byv
(alternatively, each row filled with the next value ofv
, or a diagonal matrix ofv
; ifv
can take negative value, make sure to fill the initialnumStates x numStates
completely by duplicatingv
).For the classical data, set
add
just to the initial matrix as explained above (multiplying emitted first observations with initial probabilities), and then use exclusivelymul
by passing in emitted observations multiplied by their transition probabilities:See https://en.wikipedia.org/wiki/Viterbi_algorithm
the generalized multiplicative matrix (combining transition probabilities, emission probabilities and observations). If only accumulation is used, set this to 1.0.
the generalized accumulative matrix (combining transition probabilities, emission probabilities and observations). If only multiplication is used, set this to provide the initial state (see above), followed either by zeroes or by terminating the signal.
the number of different states, as reflected by the inner dimensions of matrices
mul
andadd
.the number of observations. If
-1
, the UGen runs until the input is exhausted. This happens when bothmul
andadd
end. see StrongestLocalMaxima see PitchesToViterbi