Skip to content

Samplers

Sampler specifications for posterior inference.

NUTSSampler

Bases: BaseModel

NUTS sampler configuration for PyMC.

Attributes:

Name Type Description
draws int

Number of posterior draws per chain.

tune int

Number of tuning steps per chain.

chains int

Number of independent chains.

cores int | None

Number of CPU cores. None = auto-detect.

target_accept float

Target acceptance rate for NUTS.

random_seed int | None

Random seed for reproducibility.

sample(model)

Run NUTS sampling on the given PyMC model.

Parameters:

Name Type Description Default
model Model

A fully specified PyMC model.

required

Returns:

Type Description
InferenceData

ArviZ InferenceData with posterior and log_likelihood groups.