libcity.model.map_matching.HMMM

class libcity.model.map_matching.HMMM.HMMM(config, data_feature)[source]

Bases: libcity.model.abstract_traffic_tradition_model.AbstractTraditionModel

Hidden Markov Map Matching Through Noise and Sparseness

_find_matched_sequence()[source]

Viterbi Algorithm Returns:

_get_candidates()[source]

get candidates of each GPS sample with given road network :returns:

a list of list.

In each list are tuples (edge, distance, node)

Return type

self.candidates

_observation_probability()[source]

Returns:

_preprocess()[source]

removing points that are within 2 sigma_z of the previous included point The justification for this step is that until we see a point that is at least 2sigma_z away from its temporal predecessor, our confidence is low that the apparent movement is due to actual vehicle movement and not noise Returns:

_run_one_tra()[source]

run ST-Matching for one trajectory self.trajectory self.rd_nwk Returns:

_set_lon_lat_radius(lon, lat)[source]

get longitude range & latitude range (because radius is actually achieved by a grid search) :param lon: longitude local :param lat: latitude local :param self.r:

Returns

self.lon_r self.lat_r

_transmission_probability()[source]

Returns:

run(data)[source]
Parameters

data – input of tradition model

Returns

output of tradition model