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

Improve performance when passing through tunnels #52

Open
giorgiovisani opened this issue Feb 13, 2024 · 2 comments
Open

Improve performance when passing through tunnels #52

giorgiovisani opened this issue Feb 13, 2024 · 2 comments

Comments

@giorgiovisani
Copy link

Dear developers,
I do appreciate your hard work to produce this nice and handy package.

However, I'm struggling when it comes to tuning the hyperparameters of the matcher. In particular, I am testing it with GPS locations recorded during a motorway trip, in which we crossed few tunnels. Tunnels seem to be difficult to handle and I wanted to ask your opinion on whether it is best to:

  • Increase the obs_noise (to get a larger sigma coefficient, which does not penalize too much my correct path in terms of emission probability)
  • Increase the max_lattice_width to keep track of a larger number of possible paths in the HMM (hopefully keeping the path through the tunnel)
  • Increase non_emitting_length_factor: my intuition is "in a tunnel there have to be many subsequent non emitting states, which I do not want to penalize".
    If you have any insights on any other method to improve your algorithm performance in the presence of a tunnel, I'm very interested in your opinion.

Also, I did not get exactly how the non_emitting_length_factor parameter is exploited in the code and how it should be tuned (eg. increasing it we obtain less or more penalty for a sequence of non-emitting states? And what is the neutral value to get no penalty neither reward for the sequence of non-emitting states against a normal sequence?)

@wannesm
Copy link
Owner

wannesm commented Feb 13, 2024

The method is robust if the outliers are spread out. But if there is a longer sequence of scattered measurements you should consider applying a Kalman filter first to denoise the signal.

For example using

def smooth_path(path, dt=1, obs_noise=1e-4, loc_var=1e-4, vel_var=1e-6, kf=None,

@giorgiovisani
Copy link
Author

Thank you Wannes for your suggestion.
Indeed it works much better when I first apply the Kalman filter.
Keep up the good work :)

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