API

PosteriorDB.PosteriorDB — Module
PosteriorDB

Functionality for working with instances of a posterior database.

See https://github.com/stan-dev/posteriordb for more information.

source
PosteriorDB.database — Function
database([path::String]) -> PosteriorDatabase

Return a pointer to the PosteriorDatabase stored at path.

If path is not given, the default posterior database downloaded from a GitHub release is used.

Note

Julia 1.3 or greater is required to use the default posterior database with database().

source
PosteriorDB.database — Method
database(obj) -> PosteriorDatabase

Return the database containing obj.

obj can be a Posterior, Model, AbstractImplementation, Dataset, or ReferencePosterior.

source
PosteriorDB.dataset — Method
dataset(db::PosteriorDatabase, name::String) -> Dataset

Return a dataset object for the dataset with name name in the database db.

source
PosteriorDB.implementation — Method
implementation(model::Model, framework::String) -> AbstractImplementation

Return the implementation of the model for the given framework.

source
PosteriorDB.info — Method
info(obj) -> AbstractDict

Return the info dictionary for obj.

obj can be a Posterior, Model, Dataset, or ReferencePosterior.

source
PosteriorDB.load — Method
load(implementation::AbstractImplementation) -> String

Load the model implementation and return the code as a string.

source
PosteriorDB.load — Method
load(dataset::Dataset) -> OrderedDict{String,Any}

Load and return the data for dataset.

load(dataset::Dataset, String) -> String

Return the data for dataset as an unparsed JSON string.

source
PosteriorDB.load — Method
load(rp::ReferencePosterior) -> Vector{OrderedDict{String,Any}}

Load and return the reference draws for the reference posterior rp.

load(rp::ReferencePosterior, String) -> String

Return the reference draws as an unparsed JSON string.

source
PosteriorDB.model — Method
model(db::PosteriorDatabase, name::String) -> Model

Return a model object for the model with name name in the database db.

source
PosteriorDB.name — Method
name(obj) -> String

Return the name of obj.

obj can be a Posterior, Model, Dataset, or ReferencePosterior.

source
PosteriorDB.path — Method
path(implementation::AbstractImplementation) -> String

Absolute path to the file containing the model implementation.

source
PosteriorDB.path — Method
path(dataset::Dataset) -> String

Absolute path to the file containing the model dataset.

source
PosteriorDB.path — Method
path(rp::ReferencePosterior) -> String

Return the path to the file storing the reference draws for the reference posterior rp.

source
PosteriorDB.posterior — Method
posterior(db::PosteriorDatabase, name::String) -> Posterior

Return a posterior object for the posterior with name name in the database db.

source
PosteriorDB.recursive_stack — Method
recursive_stack(x::AbstractArray)

If x is an array of arrays, recursively stack into a single array whose dimensions are ordered with dimensions of the innermost container first and outermost last.

source
PosteriorDB.reference_posterior — Method
reference_posterior(db::PosteriorDatabase, name::String) -> ReferencePosterior

Return a pointer to the reference posterior with name name in the database db.

source
PosteriorDB.reference_posterior — Method
reference_posterior(posterior::Posterior) -> Union{Nothing,ReferencePosterior}

Return the reference posterior entry of posterior.

If no reference posterior is available, nothing is returned.

source