TorchSpatiotemporal / tsl

tsl: a PyTorch library for processing spatiotemporal data.
https://torch-spatiotemporal.readthedocs.io/
MIT License
258 stars 24 forks source link

The explanation of training mask and eval mask #13

Closed chenxiaodanhit closed 1 year ago

chenxiaodanhit commented 1 year ago

Hi Ivan,

Sorry to bother you. I am confused with the training_mask and eval_mask. May I understand that the training_mask is the mask of input which represents the missing value in input and eval_mask is the mask of target, which stands for the visible ground truth. If I want to conduct forecasting task, is it suitable to only change the parameters horizon and delay in Imputation_dataset.py? Or could you please give some advices for how to build forecasting dataset? Thank you for your help!

marshka commented 1 year ago

Hi,

in the case of forecasting, I would suggest using the SpatioTemporalDataset instead. The ImputationDataset is thought to reconstruct missing values inside a window (the one given to the model). If you want to forecast a complete sequence but then you have missing values in the target label, then my advice is to simply use the mask to compute your error only on valid values.

chenxiaodanhit commented 1 year ago

Thank you for your patience! But I met a new question :

TypeError: init() got multiple values for argument eval_mask in 'Imputationdataset.py`.

Could you please help me how to solve it? Thanks.

marshka commented 1 year ago

Hi, I cannot replicate this issue, can you give me more information about it?

chenxiaodanhit commented 1 year ago

Thank you for your help! I find the problem. It is because the version is not suit. Thank you again!

PhoebeWenpp commented 1 year ago

TypeError: init() got multiple values for argument eval_mask in 'Imputationdataset.py` Hi,I met the same question,Could you please help me how to solve it? Thanks.