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

can we support n-best path? #26

Open
suze521 opened this issue Dec 27, 2021 · 3 comments
Open

can we support n-best path? #26

suze521 opened this issue Dec 27, 2021 · 3 comments

Comments

@suze521
Copy link

suze521 commented Dec 27, 2021

now we input one gps, output the most probably road network path, can we output the most n-best path? this is very useful, for we can get more information. and i think, it can realization at "Backtrack to find best path"

@wannesm
Copy link
Owner

wannesm commented Dec 27, 2021

I'm not sure I completely understand the question. What is the definition of 'n-best path'?

You can check https://leuvenmapmatching.readthedocs.io/en/latest/usage/debug.html to see how the matching lattice can be inspected to write your own best match algorithm if you want. Or you can inspect the code in BaseMatcher._build_node_path.

@suze521
Copy link
Author

suze521 commented Dec 28, 2021

Generally, the Viterbi algorithm of HMM can only find the "one" best hidden state sequence of observable states sequence. and we can doing k-Best or List Viterbi Decoding of a HMM, like https://github.com/carthach/kBestViterbi

@wannesm
Copy link
Owner

wannesm commented Jan 2, 2022

Finding multiple paths (thus the decoding step) in the resulting lattice can be implemented using the methods described earlier.

What is extra in the List Viterbi Decoding, specifically the parallel LVA, is similar to using the max_lattice_width argument for the matcher (if you set it to L).

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