yingtaoluo / Spatial-Temporal-Attention-Network-for-POI-Recommendation

Codes for a WWW'21 Paper. POI recommender system for location/trajectory prediction.
https://doi.org/10.1145/3442381.3449998
170 stars 38 forks source link

about the 'time' dimension #31

Closed swiftCC closed 4 months ago

swiftCC commented 6 months ago

I have noted that each row in NYC.npy has the meaning of [user id, check-in location id, time in minutes]. Can you explain how to calculate the 'time in minutes' ? And when I want to use to dataset like Gowalla, the time is expressed as '2010-09-30T23:58:27Z'. How can I get the same format as the NYC does?

Iscodebrid commented 6 months ago

Hello, may I ask if you can share the other two datasets (.pkl format) besides the NYC dataset? Thanks

Iscodebrid commented 6 months ago

I have noted that each row in NYC.npy has the meaning of [user id, check-in location id, time in minutes]. Can you explain how to calculate the 'time in minutes' ? And when I want to use to dataset like Gowalla, the time is expressed as '2010-09-30T23:58:27Z'. How can I get the same format as the NYC does?

I have the same question. Have you solved it? and How to process the other three datasets mentioned in the article, apart from the NYC dataset?

yingtaoluo commented 6 months ago

I have noted that each row in NYC.npy has the meaning of [user id, check-in location id, time in minutes]. Can you explain how to calculate the 'time in minutes' ? And when I want to use to dataset like Gowalla, the time is expressed as '2010-09-30T23:58:27Z'. How can I get the same format as the NYC does?

Hi, the file "load.py" has taken care of it. Please refer to the code below (right after "# add the code below if you are using dividing time into minutes instead of hours"). For time in other slightly different formats, the key is just to transform time into second as the unit. One way is to set the first timestamp as 0 and then count how many seconds has passed since then for other timestamps.

data[:, -1] = np.array(data[:, -1]/60, dtype=np.int)
yingtaoluo commented 6 months ago

Hello, may I ask if you can share the other two datasets (.pkl format) besides the NYC dataset? Thanks

Hi, I do not keep the original dataset files. Please refer to the download link for other datasets. I also do not have the preprocessing code to get the raw data into the csv/npy format, unfortunately, and it was used by the 2016 STRNN paper.