Prior and Posterior Predictive
BFlux.sample_prior_predictive
— Functionsample_prior_predictive(bnn::BNN, predict::Function, n::Int = 1;
Samples from the prior predictive.
Arguments
bnn
a BNNpredict
a function taking a network and returning a vector of predictionsn
number of samples
Optional Arguments
rng
a RNG
BFlux.get_posterior_networks
— Functionget_posterior_networks(bnn::BNN, ch::AbstractMatrix{T}) where {T}
Get the networks corresponding to posterior draws.
Arguments
bnn
a BNNch
A Matrix of draws (columns are θ)
BFlux.sample_posterior_predict
— Functionsample_posterior_predict(bnn::BNN, ch::AbstractMatrix{T}; x = bnn.x)
Sample from the posterior predictive distribution.
Arguments