ModelComparisonSimulator#

class bayesflow.simulators.ModelComparisonSimulator(simulators: Sequence[Simulator], p: Sequence[float] = None, logits: Sequence[float] = None, use_mixed_batches: bool = True, shared_simulator: Simulator | LambdaType = None)[source]#

Bases: Simulator

Wraps a sequence of simulators for use with a model comparison approximator.

sample(batch_shape: tuple[int, ...], **kwargs) dict[str, ndarray][source]#
rejection_sample(batch_shape: tuple[int, ...], predicate: Callable[[dict[str, ndarray]], ndarray], *, axis: int = 0, sample_size: int = None, **kwargs) dict[str, ndarray]#