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

More optimisation steps for topology #4

Open
johnlees opened this issue Sep 20, 2024 · 3 comments
Open

More optimisation steps for topology #4

johnlees opened this issue Sep 20, 2024 · 3 comments

Comments

@johnlees
Copy link
Member

Don't think we ever tried adding NNI and SPR, but would probably be sensible. The radius approach from MAPLE for SPR seems sensible too

@jhellewell14
Copy link
Collaborator

Added NNI here: fbbe614

At the moment it just performs a NNI move. I need to put in some kind of structure where there is a "stable" and a "working" tree. The working tree is a copy of the stable tree, I then do moves on it, calculate the new likelihood of the working tree and "accept" them by writing this back on to the stable tree.

I do something similar for hillclimbing:

impl<T: RateMatrix> Tree<T> {

But I only save the stable and working tree vectors. For the hillclimbing this is fine because each random move starts from the last random move. For NNI each move will need to start from the stable tree rather than the previous tree.

@johnlees
Copy link
Member Author

johnlees commented Oct 9, 2024

Also if you wanted to parallelise this then I think you could keep the stable tree and pass it by ref, then in each new thread start by copying it, do the NNI move, then in the main thread just keep the one that has the highest likelihood

@johnlees
Copy link
Member Author

johnlees commented Oct 9, 2024

It would be quite neat in the rayon iterator format because you could just run max on the function return

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