tangxianfeng / STDN

Code for our Spatiotemporal Dynamic Network
275 stars 98 forks source link

Although I have read your description of the data many times in your paper, I still feel a bit confused when reading the code. #2

Closed dreampppaper closed 5 years ago

dreampppaper commented 5 years ago

Hi~ Congratulations on your paper accepted by AAAI! This is an outstanding work! Please forgive my clumsiness. Although I have read your description of the data many times in your paper, I still feel a bit confused when reading the code. As follows:

     flow_feature_curr_out = flow_data[0, real_t, x, y, :, :]
     flow_feature_curr_in = flow_data[0, real_t, :, :, x, y]
     flow_feature_last_out_to_curr = flow_data[1, real_t - 1, x, y, :, :]
     flow_feature_curr_in_from_last = flow_data[1, real_t - 1, :, :, x, y]

I know that the first two cows of your code are the inflow/outflow matrices in the t-th time interval you described in the paper. But I have a question about the code of the last two lines. From the perspective of the variable name you defined,it means departing/arriving from this region/other regions in last time interval to other regions/this region in real_t time interval. If it is the meaning I described above,why flow_data[1, real_t, :, :, x, y] != flow_data[0, real_t, :, :, x, y]? if not,could you tell me the meaning of last tow lines.

tangxianfeng commented 5 years ago

You can image like this: the flow can take longer than one time interval. The first two lines extract flows that start/end in the same time interval, while the remained lines extract flows that start in $t-1$, and end in $t$. You can also add more, such as starting in $t-2$ and ending in $t$. However, I find that those flows are 1) very rare; 2) not very helpful. So I only include the most recent flows cross 0 or 1 time interval. I use the same index because I save flows at those index during preprocessing. If you generate your own data, make sure that flows are put on the correct location (index).

dreampppaper commented 5 years ago

Thank you for your answer! Thank you for your enthusiasm! Thank you very much! Whats more,I think maybe the flow that may arrive in the first few hours before real t interval may be helpful.