LibCity / Bigscity-LibCity

LibCity: An Open Library for Urban Spatial-temporal Data Mining
https://libcity.ai/
Apache License 2.0
947 stars 168 forks source link

How to train DCRNN, STGCN, MTGNN model use different datasets #361

Closed tianshubao1 closed 1 year ago

tianshubao1 commented 1 year ago

Dear Staff,

How are you? Hope you are doing well.

We are trying to use your methods (DCRNN, STGCN, MTGNN) as baselines in our proposed model. However, I found that your data are complied as a config file which is not easy to modify. We have the processed npy datasets and for the model training and testing. But we are not sure how to build a config file to make them compatible with the settings.

Thanks! Looking forward to your reply.

aptx1231 commented 1 year ago

If it's a dataset of npy files, it's not complicated to modify, just change the places in traffic_state_dataset.py about reading files. But this may be difficult for those who are not familiar enough with the Libcity code, so I suggest using the atomic files we provide~.

aptx1231 commented 1 year ago

https://github.com/LibCity/Bigscity-LibCity/blob/master/libcity/data/dataset/traffic_state_datatset.py#L238 This function is to convert the atomic file into an array in npy format, you can modify this function to read the npy file directly~

tianshubao1 commented 1 year ago

Can I write something like this https://github.com/LibCity/Bigscity-LibCity-Datasets/blob/master/metr_la.py to convert the npy files into atomic files, and then let the model run atomic file directly? Would this be easier?

aptx1231 commented 1 year ago

yes, you are right. atomic files are just csv format in fact. it is easy to convert npy to atomic files.

tianshubao1 commented 1 year ago

One quick question, how to set the input_window and output_window to 1?

I can't do it in cmd. I think maybe I can do it in config.json but I am not sure how to set it.

aptx1231 commented 1 year ago

Yes,set it in the config.json 

发自我的iPhone

------------------ Original ------------------ From: Tianshu Bao @.> Date: Tue,Oct 17,2023 0:35 PM To: LibCity/Bigscity-LibCity @.> Cc: Jiawei Jiang @.>, State change @.> Subject: Re: [LibCity/Bigscity-LibCity] How to train DCRNN, STGCN, MTGNN modeluse different datasets (Issue #361)

One quick question, how to set the input_window and output_window to 1?

I can't do it in cmd. I think maybe I can do it in config.json but I am not sure how to set it.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

tianshubao1 commented 1 year ago

Thanks, I've figured that out.