ghedin-lab / haplocorr

GNU General Public License v2.0
0 stars 0 forks source link

Error Correction Fix #1

Open twaddlac opened 9 years ago

twaddlac commented 9 years ago

I'm not sure what bugs to look for in this, though Zeke said there were some indefensible numbers hard-coded in.

He suggested that I look in the TProbs function (in HMM.py) to see if: "given the type of links ((char -> int) dict list list) and the code there it can't return another handled exception."

"Also in walk make sure that the transition and emission probabilities are being added." This should be fairly straight forward - I guess just look to make sure the numbers add up when necessary?

zekerosenberg commented 9 years ago

The bug is not so much a bug as all of the values are disappearing as error correction goes on. I eventually figured out why the process was so random, but now it's so specific that everything is impossible. There are two places that bugs are particularly likely. The first is in the transition probability section. It's doing a lot of little things that I could easily have screwed up and caused it to repeatedly reduce probabilities to very low numbers even though it's designed to only increase the numbers. The second is in the memoization. It's possible that I am memoizing in a silly way that destroys the right answer early on in the test we're using and then never can recover. I don't have a ton of experience with it so I'm not entirely sure what I should do about it.