executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
posterior_sample_approximationFit compact posterior approximations from SBI simulator pairs and emit posterior samples with optimizer traces.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this skill when an SBI recovery needs approximate posterior samples from simulation pairs and a fixed observation. It is designed for bounded reduced experiments where a full neural density estimator is unavailable, but the run must still perform an actual optimizer step and return posterior samples.
Do not use this skill as a substitute for a full neural SBI algorithm when that runtime is available. It is a reduced mechanism-preserving approximation.
theta and x arrays.loss_before, loss_after, params_before, params_after, and optimizer_state_changed.Run:
python scripts/posterior_sample_approximation.py self-test
python tests/test_posterior_sample_approximation.py
This script implements a small affine posterior mean model with diagonal Gaussian sampling noise. It demonstrates the benchmark mechanism and optimizer evidence, but it is not a normalizing-flow posterior estimator.
The optimizer_state_changed flag is evidence-bearing: a zero-step or otherwise frozen run must leave it false, with identical params_before and params_after.