Skip to content

Local-C2ST and access to samples from the true posterior #1303

Discussion options

You must be logged in to vote

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 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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by janfb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants