Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement viterbi in c++ #58

Open
georgid opened this issue Dec 12, 2017 · 2 comments
Open

Implement viterbi in c++ #58

georgid opened this issue Dec 12, 2017 · 2 comments

Comments

@georgid
Copy link
Owner

georgid commented Dec 12, 2017

With essentia’s viterbi MTG/essentia#253
or

@georgid
Copy link
Owner Author

georgid commented Dec 16, 2017

Before starting, check the readme until the Lyrics class

I. Reimplement essential methods:

  1. Reimplement creation of a transition probability matrix. It needs as parameter the statesNetwork which is a list of class StateWithDur, from which the transiion matrix needs only a few methods like getWaitProb() Maybe it is best to keep _HMM as wrapper calling the C++ functions, in which these StateWithDur-specific logic is called. This way there is no need to reimplement StateWithDur in C++.

  2. Reimplement the calculation of observation likelihoods matrix src.hmm.continuous._ContinuousHMM._ContinuousHMM._mapB
    . Note that the method pdfAllfeatures is implemented in MLPHMM and it calls theano using the DNN model.
    So maybe the obs. matrix should remain in python and find a way to combine the numpy array with the transmatrix in C++ ???

  3. Reimplement the calculation of forced Viterbi algorithm here. You can also check the method InitDecodingParameters that precomputes the observation matrix.

In fact 1. and 3. mean reimplmentation of all methods in class _HMM except viterbi_fast() and visualize_trans_probs(). Is it possible to do a class HMM in C++, without changing the class hierarchy in python: MLPHMM needs _HMM as parent: see this diagram

  1. Reimplement the backtracking

II. Do integration test

@georgid
Copy link
Owner Author

georgid commented Jan 21, 2018

Step 3. done in the fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants