gzerveas / mvts_transformer

Multivariate Time Series Transformer, public version
MIT License
718 stars 169 forks source link

what's the right way to calculate predicted value and extract the representation? #25

Closed superfan123 closed 1 year ago

superfan123 commented 1 year ago

Hi George, Great project. This really open a new way for MTS analysis. I have run your code and everything looks good and very fast. When I tried to use the model to calculate the prediction, the value can't match the results in "predictions" folder. So what I did is load the check points, load the best model, then use first row in "predictions" targets.npy to feed into the model and compare the output with first row in predictions.npy . padding_masks = torch.BoolTensor([[1]]) . My results can't match the prediction output from yours. could you share some idea how to do this on a record by record base? Another question is how to extract the encoder value, for example I have PM25 data 24 by 9 dataframe, How to get the corresponding 24 by 128 representation data frame? As once this step done I can use the new dataframe for other models input and don't need to calculate these values on the fly to save some time? Thank you in advance.

gzerveas commented 1 year ago

Hi, thank you for the kind words.