workflows#
High-level interfaces for amortized Bayesian workflows. BasicWorkflow is a good place
to start; for ensemble-based inference see EnsembleWorkflow.
Examples#
>>> import bayesflow as bf
>>> workflow = bf.BasicWorkflow(
... simulator=bf.simulators.SIR(),
... inference_network=bf.networks.FlowMatching(),
... inference_variables=["parameters"],
... inference_conditions=["observables"],
... )
>>> history = workflow.fit_online(epochs=20, batch_size=32, num_batches_per_epoch=200)
>>> diagnostics = workflow.plot_default_diagnostics(test_data=300)
Classes
|
This class provides methods to set up, simulate, and fit and validate models using amortized Bayesian inference. |
|
This class extends the Basic Workflow to support compositional inference, allowing for the generation of samples conditioned on multiple datasets or compositional conditions. |
|
Ensemble variant of |