LeuvenMapMatching
LeuvenMapMatching copied to clipboard
can we support n-best path?
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"
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
.
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
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).