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

Lazy specification of transition matrix #120

Open
gdalle opened this issue Nov 15, 2024 · 3 comments
Open

Lazy specification of transition matrix #120

gdalle opened this issue Nov 15, 2024 · 3 comments

Comments

@gdalle
Copy link
Owner

gdalle commented Nov 15, 2024

It would be cool to allow users to overload mul! for the transition matrix, especially when they have structured transitions that cannot be easily represented in a single matrix object.

Examples:

@murrellb
Copy link

murrellb commented Nov 15, 2024

FYI the way we handle this in MolecularEvolution.jl, where a phylogeny can be thought of as a branching HMM (instead of a lattice), is to have forward and backward functions called by the likelihood algorithms. For a simple transition probability matrix these just wrap mul!, but you can define any behavior you want (we mostly use various CTMCs). We also do something similar for more general state spaces, including continuous ones.

@gdalle
Copy link
Owner Author

gdalle commented Nov 15, 2024

Thanks! That's what I ended up doing in #121 but how do you handle Viterbi? Here the operation is a max-plus matrix multiplication (in log scale), not an ordinary one.

@murrellb
Copy link

We don't work in the log domain.

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