LeuvenMapMatching icon indicating copy to clipboard operation
LeuvenMapMatching copied to clipboard

can we support n-best path?

Open suze521 opened this issue 3 years ago • 3 comments

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"

suze521 avatar Dec 27 '21 08:12 suze521

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.

wannesm avatar Dec 27 '21 22:12 wannesm

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

suze521 avatar Dec 28 '21 02:12 suze521

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).

wannesm avatar Jan 02 '22 21:01 wannesm