Closed TienNguyenKha closed 1 year ago
Do you mean prediction with a trained model?
You need to specify two parameters, one is --train False
, which controls the code to test directly without training.
The other is --exp_id ID
. ID is an exp_id randomly generated when training the model. The trained model should be stored in the directory libcity/cache/ID/model_cache
, so you need to specify the ID.
What does "1 sample" mean?
What does "1 sample" mean?
I'm using ACFM model for traffic flow prediction task. And I trained it with "NYCTAXI201401-201403_GRID" dataset. I saw the length of 1 input sequence is 6 and the output is 1. How can I predict with another new sequence? I don't know how to preprocessing new raw data to model's input and which code to call and predict this new sequence.
Modify the parameters input_window
and output_window
to change the length of input and output.
Do you mean prediction with a trained model? You need to specify two parameters, one is
--train False
, which controls the code to test directly without training. The other is--exp_id ID
. ID is an exp_id randomly generated when training the model. The trained model should be stored in the directorylibcity/cache/ID/model_cache
, so you need to specify the ID.
This is all that is needed to make predictions with the trained model, no data processing is required.
I keep the input_window and output_window like you. I mean, If I have new sequence (,=not in train/val/test). Which code I need to use in this case to predict?
This requires processing the data into atomic files before libcity can be used.
Assume I had atomic files, which code can I use ?
You can run the model directly with run_model.py
, --train false and --exp_id ID to specify the location of the pre-trained model to apply the pre-trained model to the new data.
Can I run "test_model.py" to test? I trained AFCM model with id=28778. Have I configured it properly to load this model ?
test_model.py only takes a batch data for testing, it can't achieve your requirement
Hello, I have a similar problem. If we only have the value of X, how do we make the inference of y using the existing model? Thanks a lot.
You can run the model directly with
run_model.py
, --train false and --exp_id ID to specify the location of the pre-trained model to apply the pre-trained model to the new data.
In this case, a pre-trained model is needed first. You can use other datasets to train the model in Libcity and generate a exp_id
when training.
Then, you can run the model directly with run_model.py
, --train false
and --exp_id ID
to specify the location of the pre-trained model to apply the pre-trained model to the new data X.
You can run the model directly with
run_model.py
, --train false and --exp_id ID to specify the location of the pre-trained model to apply the pre-trained model to the new data.
Thank you for your response. Is the implementation steps as follows.
Suppose I have finished training DMVST with NYCTaxi20150103 dataset, then when I want to predict future data, e.g., taxi demand after 2015/3/1.
I need to modify NYCTaxi20150103.grid to add the data after 2015/03/01, and set departing_volume and arriving_volume to 0.
Finally, use run_model to adjust the test_rate to get the predicted value after multiple steps.
You can run the model directly with
run_model.py
, --train false and --exp_id ID to specify the location of the pre-trained model to apply the pre-trained model to the new data.Thank you for your response. Is the implementation steps as follows.
Suppose I have finished training DMVST with NYCTaxi20150103 dataset, then when I want to predict future data, e.g., taxi demand after 2015/3/1.
I need to modify NYCTaxi20150103.grid to add the data after 2015/03/01, and set departing_volume and arriving_volume to 0.
Finally, use run_model to adjust the test_rate to get the predicted value after multiple steps.
Yes, after you have trained DMVSTNET, just set --train false
and the appropriate test_rate
to make predictions only on this part of the test set. Thank you for the detailed steps.
Hi, thank for your contribution you have made. I wonder if i could use trained model to predict on a new sample ? Can you give me instructions or code demo? ( Now I'm using ACFM model for traffic flow prediction task. )