FunctionProbabilityViterbi

The Viterbi Algorithm calculates the most likely sequence of hidden states *(called Viterbi path)*
that results in a sequence of observed events.
viterbi(observations, transitions, emissions, initial_distribution)
Calculate most probable path in a Markov model.
Parameters:
observations (int[]): array<int> . Observation states data.
transitions (matrix<float>): matrix<float> . Transition probability table, (HxH, H:Hidden states).
emissions (matrix<float>): matrix<float> . Emission probability table, (OxH, O:Observed states).
initial_distribution (float[]): array<float> . Initial probability distribution for the hidden states.
Returns: array<int>. Most probable path.
Updated:
viterbi(observations, transitions, emissions, initial_distribution)
Calculate most probable path in a Markov model.
Parameters:
observations (array<int>): array<int> . Observation states data.
transitions (matrix<float>): matrix<float> . Transition probability table, (HxH, H:Hidden states).
emissions (matrix<float>): matrix<float> . Emission probability table, (HxO, O:Observed states).
initial_distribution (array<float>): array<float> . Initial probability distribution for the hidden states.
Returns: array<int>. Most probable path.
Pine Bibliothek
Ganz im Sinne von TradingView hat dieser Autor seinen/ihren Pine Code als Open-Source-Bibliothek veröffentlicht. Auf diese Weise können nun auch andere Pine-Programmierer aus unserer Community den Code verwenden. Vielen Dank an den Autor! Sie können diese Bibliothek privat oder in anderen Open-Source-Veröffentlichungen verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert.
Haftungsausschluss
Pine Bibliothek
Ganz im Sinne von TradingView hat dieser Autor seinen/ihren Pine Code als Open-Source-Bibliothek veröffentlicht. Auf diese Weise können nun auch andere Pine-Programmierer aus unserer Community den Code verwenden. Vielen Dank an den Autor! Sie können diese Bibliothek privat oder in anderen Open-Source-Veröffentlichungen verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert.