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

Suggestion/request for bab (branch and bound) function when runtime is long #175

Open
bbitarello opened this issue Sep 18, 2024 · 3 comments

Comments

@bbitarello
Copy link

Hello,

I have been using the bab function (thank you!) a lot lately and sometimes it takes very long, presumably due to having to explore a wider space of the possible trees. I understand this is unavoidable because of the algorithm.

My suggestion is that the function could somehow keep track of how many times it has to cycle over the while (npsc > 0) { and, beyond a certain number, it periodically print something out so that we have a sense of "where it's at" in terms of searching that tree space. Right now it is not possible to try to predict how long a bab run will take, and runtimes vary enormously even for the same number of tips and traits (again unavoidable), and having some info printed out when it's taking long could be helpful.

Thank you for considering this suggestion!

@KlausVigo
Copy link
Owner

Dear @bbitarello,

thanks for the suggestions. I made some changes and added progress bar, but it is very likely that the steps take different time. You can switch trace to 0, to shut it up.
You can try this in the development version

install.packages('phangorn', repos = 'https://klausvigo.r-universe.dev')

Let me know if this works for you.

Kind regards,
Klaus

@bbitarello
Copy link
Author

Thank you so much. Since we're currently wrapping up a project using bab(), I will finish that with the non-dev version and then will test this and report back. Thanks again!

@KlausVigo
Copy link
Owner

The development version should be also a bit faster (up to twice as fast) as I reduced a bit of overhead.
Regards,
Klaus

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

No branches or pull requests

2 participants