bmwcarit / hmm-lib Goto Github PK
View Code? Open in Web Editor NEWLibrary for time-inhomogeneous Hidden Markov Models
License: Apache License 2.0
Library for time-inhomogeneous Hidden Markov Models
License: Apache License 2.0
Would be super cool to have the 0.2.0 in maven central to be used from us. For now we are using the cloned repo directly in our repo, which is kind of suboptimal.
long start = System.currentTimeMillis();
hmmManager.setGpsList(gpslist);
List<Foot_Data> list = hmmManager.GetLocations();
long end = System.currentTimeMillis();
Log.e("HMM TIME COST", String.valueOf(end - start));
public List<Foot_Data> GetLocations() {
setUpClass();
ViterbiAlgorithm<RoadPosition, GpsMeasurement, RoadPath> viterbi =
new ViterbiAlgorithm<>();
TimeStep<RoadPosition, GpsMeasurement, RoadPath> prevTimeStep = null;
for (GpsMeasurement gpsMeasurement : gpsList) {
final Collection<RoadPosition> candidates = computeCandidates(gpsMeasurement);
final TimeStep<RoadPosition, GpsMeasurement, RoadPath> timeStep =
new TimeStep<>(gpsMeasurement, candidates);
computeEmissionProbabilities(timeStep);
if (prevTimeStep == null) {
viterbi.startWithInitialObservation(timeStep.observation, timeStep.candidates,
timeStep.emissionLogProbabilities);
} else {
computeTransitionProbabilities(prevTimeStep, timeStep);
viterbi.nextStep(timeStep.observation, timeStep.candidates,
timeStep.emissionLogProbabilities, timeStep.transitionLogProbabilities,
timeStep.roadPaths);
}
prevTimeStep = timeStep;
}
List<Foot_Data> list = new ArrayList<>();
List<SequenceState<RoadPosition, GpsMeasurement, RoadPath>> roadPositions =
viterbi.computeMostLikelySequence();
for (SequenceState<RoadPosition, GpsMeasurement, RoadPath> s : roadPositions){
Point p = s.state.position;
Road_Data road_data = s.state.road_data;
list.add(new Foot_Data(p,road_data));
}
return list;
}
The GetLocations is an method to achieve map-matching algorithm. It works well,but we have find something wrong with the TIME COST,HMM looks like have an accumulation delay. Could you please tell me why the TIME COST will increase? And if I want to resolve this problem, what should I do? THK U
To integrate this with GraphHopper we would need the TimeStep.observation. See
Is it possible to integrate this into upstream?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.