PINE LIBRARY

FunctionProbabilityViterbi

Mis à jour
Library "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.
Notes de version
v2 minor update.
Notes de version
Minor update: console library version.
Notes de version
v4 - added some error overloads with custom message to handle some cases.
Notes de version
v5 - updated the description of the function to fix a typo, thanks to serkany88 for catching the little bugger :p

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.
markovmarkovchainprobabilitysequencestatisticsviterbi

Bibliothèque Pine

Dans le plus pur esprit TradingView, l'auteur a publié ce code Pine en tant que bibliothèque open-source afin que d'autres programmeurs Pine de notre communauté puissent le réutiliser. Bravo à l'auteur! Vous pouvez utiliser cette bibliothèque en privé ou dans d'autres publications à code source ouvert, mais la réutilisation de ce code dans une publication est régie par nos Règles.

Clause de non-responsabilité