AI4HealthUOL / SSSD

Repository for the paper: 'Diffusion-based Time Series Imputation and Forecasting with Structured State Space Models'
MIT License
270 stars 47 forks source link

Inference #21

Closed jdariasl closed 6 months ago

jdariasl commented 7 months ago

Hi, thank you for sharing the code.

By analyzing the code, I found that, during inference, the network is conditioned on the same input batch:

epsilon_theta = net((x, cond, mask, diffusionsteps,)) # predict \epsilon according to \epsilon\theta

Where cond is just the batch without applying any mask. Do I miss something? In a real imputation case scenario, should I replace the missing segment with zeros, similar to applying the mask to the cond variable?

Thank you in advance for your support.

jdariasl commented 7 months ago

Sorry, I didn't see this line: conditional = conditional * mask, which answers my question.