liyaguang / DCRNN

Implementation of Diffusion Convolutional Recurrent Neural Network in Tensorflow
MIT License
1.22k stars 400 forks source link

Question for the cost in /data/sensor_graph/distances_la_2012.csv #55

Closed applewind0 closed 3 years ago

applewind0 commented 4 years ago

Thanks for your paper and your code. I've got some problems on the cost in /data/sensor_graph/distances_la_2012.csv. According to paper, I thought that the "cost" should be the distance, but the value I calculated didn't seem like distance, may I know more about the details of the "cost"? Besides, why are the costs not symmetric? Thanks for your answer.

liyaguang commented 4 years ago

Thanks for the interest of the paper. The cost in the /data/sensor_graph/distances_la_2012.csv indicates the road network distance from the start to the end, which is not symmetric, e.g., some of roads might be one way.

applewind0 commented 4 years ago

Thanks again!

Qofsd commented 4 years ago

hello,i have a question that is how we calculate the cost in "distance_la_2012.csv"?Are you get the cost from the latitude and longitude in graph_sensor_locations.csv?

liyaguang commented 3 years ago

As mentioned in the Section 4, the pairwise road network distances between sensors are used as the cost.

To get the cost, we may first map the lat/lon into the road network (with map-matching), and then run the A* algorithm to find the shortest distance between sensor pairs. An alternative way is to use online Map service, which can provide the distance given a source and destination pair.