-
Notifications
You must be signed in to change notification settings - Fork 205
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
Chord decoder confidence #431
Comments
So I guess we can achieve this in a frame-local way by using the learned emission probabilities in the CRF and applying a softmax function:
However if we wanted to take the transition probabilities etc into account we would probably need to apply the forward-backward algorithm. Is this something that could be added to the |
Ping @fdlm since he is the chord/CRF guy. |
Yes, this is correct. If you want to consider transition probabilities, you need the forward-backward algorithm, and yes, it could be added to the |
I took a stab at partial implementation (master...hpx7:patch-1) but I'm stuck on a few things I haven't been able to figure out yet:
Sorry for all the questions, I'm just posting them as I work through understanding all this as it's a new area for me. |
You can check out my CRF code for Theano here: https://github.com/fdlm/Spaghetti/blob/master/spaghetti/layers.py ( |
Thanks for the pointers @fdlm. I got some time to look into this more. The only way I could figure out how to normalize at each step was to apply the I've gotten rid of softmaxing You can see my changes here: master...hpx7:patch-1. Is there anything you'd like to see prior to me making a PR? |
Hey, thanks for your work. The best way to verify that your implementation is correct is to test it against an existing one. Since the chord recognition model you're using was actually trained using the code here: https://github.com/fdlm/Spaghetti/blob/master/spaghetti/layers.py and only later translated to a pure Python/Numpy implementation, this would be the way to go. I understand that it's probably a lot of work, especially to get Theano running again :), but to be honest, I'm not willing to merge code that I'm not 100% sure it's correct. I still believe there's something wrong with the softmaxing, but I don't have time to debug it. |
The
CRFChordRecognitionProcessor
uses the Viterbi algorithm to compute the most likely chord sequence at the frame level. I'm wondering if there's a way during decoding to obtain confidence levels per frame about chord possibilities.In particular, is there an easy way to obtain marginal probabilities per chord label from the
CNNChordFeatureProcessor
feature vectors? From a bit of research it looks like the forward-backward algorithm may be useful for this, but I'm not exactly sure how we would apply it here.The text was updated successfully, but these errors were encountered: