Learn R Programming

NeuralEstimators (version 0.2.0)

sampleposterior: sampleposterior

Description

Samples from the approximate posterior distribution given data Z.

Usage

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

Value

a d × N matrix of posterior samples, where d is the dimension of the parameter vector. If Z is a list containing multiple data sets, a list of matrices will be returned

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(), applicable when estimator is a likelihood-to-evidence-ratio estimator

See Also

estimate() for making inference with neural Bayes estimators