Class HMMPathMatcher<O,V,T>

java.lang.Object
com.here.platform.location.core.mapmatching.HMMPathMatcher<O,V,T>
All Implemented Interfaces:
com.here.platform.location.core.mapmatching.PathMatcher<O,V,T>

public class HMMPathMatcher<O,V,T> extends Object implements com.here.platform.location.core.mapmatching.PathMatcher<O,V,T>
An implementation of PathMatcher that creates a Hidden Markov Model (HMM) and calculates the most likely path using the Viterbi algorithm.

An instance of HMMPathMatcher delegates the creation of the following HMM components:

  • The candidateGenerator object creates candidate states.
    Candidate states are possible MatchResults for a given observation of type O. Typically, a candidate state is the projection of an observation onto a nearby vertex of type V.
  • The emissionProbabilityStrategy object calculates the emission probabilities.
    The emission probability represents the probability that an observation is emitted supposing that the system is in a given candidate state.
  • The transitionProbabilityStrategy object calculates the transition probabilities. Depending on the implementation, this object may return additional information of type T about the transitions.
    Given two successive observations O1 and O2, a candidate state C1 generated for O1 and a candidate state C2 generated for O2, the transition probability between C1 and C2 represents the probability of the system going from state C1 to state C2.

See also Hidden Markov Map Matching Through Noise and Sparseness.

param: candidateGenerator An object that generates candidate states for a particular observation param: emissionProbabilityStrategy An object that calculates the probability that an observation is emitted supposing that the system is in a given candidate state param: transitionProbabilityStrategy An object that calculates the probability of going from one candidate state generated for an observation at time t to another candidate state generated for an observation at time t + 1. This object may also return additional data of type T about the transition

  • Constructor Summary

    Constructors
    Constructor
    Description
    HMMPathMatcher(com.here.platform.location.core.mapmatching.CandidateGenerator<O,V> candidateGenerator, com.here.platform.location.core.mapmatching.EmissionProbabilityStrategy<O,V> emissionProbabilityStrategy, com.here.platform.location.core.mapmatching.TransitionProbabilityStrategy<O,V,T> transitionProbabilityStrategy)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.here.platform.location.core.mapmatching.MatchedPath<V,T>
    matchPath(scala.collection.Seq<O> observations)
     
    scala.concurrent.Future<com.here.platform.location.core.mapmatching.MatchedPath<V,T>>
    matchPathAsync(scala.collection.Seq<O> observations, scala.concurrent.ExecutionContext ec)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HMMPathMatcher

      public HMMPathMatcher(com.here.platform.location.core.mapmatching.CandidateGenerator<O,V> candidateGenerator, com.here.platform.location.core.mapmatching.EmissionProbabilityStrategy<O,V> emissionProbabilityStrategy, com.here.platform.location.core.mapmatching.TransitionProbabilityStrategy<O,V,T> transitionProbabilityStrategy)
  • Method Details

    • matchPath

      public com.here.platform.location.core.mapmatching.MatchedPath<V,T> matchPath(scala.collection.Seq<O> observations)
      Specified by:
      matchPath in interface com.here.platform.location.core.mapmatching.PathMatcher<O,V,T>
    • matchPathAsync

      public scala.concurrent.Future<com.here.platform.location.core.mapmatching.MatchedPath<V,T>> matchPathAsync(scala.collection.Seq<O> observations, scala.concurrent.ExecutionContext ec)