Assuming the following model:
# Bayesian linear regression.
@model function linear_regression(x, y)
# Set variance prior.
σ² ~ truncated(Normal(0, 100); lower=0)
# Set intercept prior.
intercept ~ Normal(0, sqrt(3))
# Set the priors on our coefficients.
nfeatures = size(x, 2)
coefficients ~ MvNormal(Zeros(nfeatures), 10.0 * I)
# Calculate all the mu terms.
mu = intercept .+ x * coefficients
return y ~ MvNormal(mu, σ² * I)
end
Is there a way to extract the priors set in the model? Something like:
(σ²=truncated(Normal(0, 100); lower=0),
intercept=Normal(0, sqrt(3)))
I couldn’t find any solutions in the Turing documentation, so thanks for any pointers!