sampleposterior: sampleposterior

View source: R/core.R

sampleposteriorR Documentation

sampleposterior

Description

Samples from the approximate posterior distribution given data Z.

Usage

sampleposterior(estimator, Z, N = 1000, ...)

Arguments

estimator

a neural posterior or likelihood-to-evidence-ratio estimator

Z

data in a format amenable to the neural-network architecture of estimator

N

number of approximate posterior samples to draw

...

additional keyword arguments passed to the Julia version of sampleposterior()

Value

a d \times N \times K array of posterior samples, where d is the dimension of the parameter vector, N is the number of draws, and K is the number of independent data sets in Z (so a single data set yields a d \times N \times 1 array)

See Also

infer() for a unified inference interface, and estimate() for making inference with neural Bayes estimators


NeuralEstimators documentation built on Sept. 10, 2026, 1:12 a.m.