LxMLS / lxmls-guide

Lisbon Machine Learning Summer School Lab Guide
81 stars 61 forks source link

Viterbi pseudocode has incorrect output #44

Closed miguelbalmeida closed 4 months ago

miguelbalmeida commented 10 years ago

In the guide, the pseudocode outputs just the Viterbi path, i.e., the best sequence of states. In the LXMLS code, the function "run_viterbi" from file sequences/sequence_classification_decoder.py, which is called from function "viterbi_decode" in file sequences/sequence_classifier.py, is expected to return the best sequence of states and the corresponding score:

best_states, total_score = self.decoder.run_viterbi(initial_scores, transition_scores, final_scores, emission_scores)

We should add, in the guide, that the output is the best path AND the corresponding score.