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

Division by zero on large trees #4

Open
GoogleCodeExporter opened this issue Apr 7, 2015 · 2 comments
Open

Division by zero on large trees #4

GoogleCodeExporter opened this issue Apr 7, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Large trees are and have always been difficult for prime. But we are not 
dealing with it smart enough. 

Currently, you get a division-by-zero error if a given start tree does not fit 
well in the species tree. This happens at 
   se.cbb.jprime.mcmc.MetropolisHastingsAcceptor.acceptProposedState(MetropolisHastingsAcceptor.java:38)
or rather 
  se.cbb.jprime.math.LogDouble.div(LogDouble.java:309)
which is subsequently called. 

I am not sure what the best behaviour is, but there should at least be an 
explanation of why this happens. One could also consider allowing (with an 
option) to ignore zero probability of a state and always accept new states. 

Ideally, one would like to have a starting tree with non-zero probability, of 
course.

Original issue reported on code.google.com by [email protected] on 21 Aug 2013 at 8:58

@GoogleCodeExporter
Copy link
Author

With a small change in MCMCManager class, jprime should no longer give 
divide-by-zero error. It will simply reject a state if its probability is not 
greater than zero. Statistics of number of states accepted are shown in the 
output.

Original comment by [email protected] on 30 Aug 2013 at 5:43

@GoogleCodeExporter
Copy link
Author

I have at least changed DLRS to exit gracefully if a zero probability starting 
state occurs.

Original comment by [email protected] on 10 Sep 2013 at 7:39

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

1 participant