Reference / binference.engines.Engine

binference.engines.Engine

class binference.engines.Engine(model, *, rng=None, progress=False)[source]

Base class of all inference engines.

Engines are configured at construction and executed with run(), which returns a PopulationResult (or a PointEstimate for MAP). Construction checks the options and draws no random numbers, so method="auto" makes an engine to check its options and makes it again to run it.

Parameters:
modelPopulationModel

The model to infer.

rngint, numpy.random.Generator, or None

Random number generator.

progressbool

Show a progress bar.

__init__(model, *, rng=None, progress=False)[source]

Methods

__init__(model, *[, rng, progress])

run(*args, **kwargs)

unsupported(model)

Why the engine cannot run on model, or None when it can.

Attributes

joint

whether the engine infers a selection from injections or a tallied response jointly

markov

whether its draws are Markov chains, described by R-hat and ESS

joint = False

whether the engine infers a selection from injections or a tallied response jointly

markov = False

whether its draws are Markov chains, described by R-hat and ESS

classmethod unsupported(model)[source]

Why the engine cannot run on model, or None when it can.

Parameters:
modelPopulationModel

The model to run on.