Local-C2ST and access to samples from the true posterior #1303
-
Hello, In the tutorial and the paper by Linhart et al., 2023, it’s emphasized that l-C2ST works without requiring access to samples from the true posterior. But in the tutorial, samples_true_posterior_gaussian_mixture_uniform_prior is used to generate ref_samples. Am I missing something, or are samples from the true posterior generated using the likelihood? I would appreciate it if you could clarify this for me. In general, I have a more fundamental question/request. In a dynamic model like SIR (Susceptible-Infected-Recovered), is it possible to use l-C2ST without explicitly defining the likelihood function? I would be very grateful if someone could provide a minimum working example of how it works (the stochasticity of the model comes from measurement/process noise, but the simulator returns the outcome variables, such as the number of Infected/Recovered). Thank you very much, and kind regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi there, thanks for raising this! Indeed, the tutorial is framed a bit confusingly here. You do not need reference samples for running L-C2ST. You can run it by: from sbi.diagnostics.lc2st import LC2ST
torch.manual_seed(42) # seed for reproducibility
# sample calibration data
theta_cal = prior.sample((NUM_CAL,))
x_cal = simulator(theta_cal)
post_samples_cal = posterior.sample_batched((1,), x=x_cal)[0] The And yes, you do not need an explicit likelihood function for L-C2ST. Let me know if you have more questions! |
Beta Was this translation helpful? Give feedback.
Hi there,
thanks for raising this! Indeed, the tutorial is framed a bit confusingly here. You do not need reference samples for running L-C2ST. You can run it by:
The
ref_samples_star
are only used for plotting and explanation.And yes, you do not need an explicit likelihood function for L-C2ST.
Let me know if you have more questions!
Michael