Class HMMPathMatcher<O,V,T>
- All Implemented Interfaces:
com.here.platform.location.core.mapmatching.PathMatcher<O,
V, T>
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 possibleMatchResult
s for a given observation of typeO
. Typically, a candidate state is the projection of an observation onto a nearby vertex of typeV
. - 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 typeT
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
ConstructorsConstructorDescriptionHMMPathMatcher
(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 TypeMethodDescriptionmatchPathAsync
(scala.collection.Seq<O> observations, scala.concurrent.ExecutionContext ec)
-
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