Y-debug-sys / Diffusion-TS

[ICLR 2024] Official Implementation of "Diffusion-TS: Interpretable Diffusion for General Time Series Generation"
MIT License
186 stars 27 forks source link

Tutorial0 Unnormalize and Question on FFT term in loss funciton #3

Closed littlestone111 closed 8 months ago

littlestone111 commented 8 months ago
  1. The commented code seems to work for datasets other than sine. ori_data = np.load(os.path.join(dataset.dir, f"{dataset_name}_normtruth{seq_length}_train.npy"))

Maybe there is something with unnormalize_to_zero_to_one?

  1. Want to confirm the FFT loss term is utilized for each feature (time series) not each time step.
Y-debug-sys commented 8 months ago

For the first question, it has been unnormalized to [0, 1] before saving: Screen And regarding the second question, see the following screenshot: Simulate The output is symmetrical in the second dimension (with length 24). Hope this answer can solve your problem.

littlestone111 commented 8 months ago

Thank you for the fast reply.

Could you please elaborate a little bit on each dimension of ts_simulate. Is it (Batch, sequence length, # of variable)?

If yes, I guess it is FFT on each variable and on its time domain.

Screenshot 2024-03-13 at 11 07 48 PM
Y-debug-sys commented 8 months ago

Yes, the dimension is the same as the input tensor.

littlestone111 commented 8 months ago

Cool. Thank you for your time.