prior.mixturescale {BayesFluxR}R Documentation

Scale Mixture of Gaussian Prior

Description

Uses a scale mixture of Gaussian for each network parameter. That is, the prior is given by

\pi_1 Normal(0, sigma1) + (1-\pi_1) Normal(0, sigma2)

Usage

prior.mixturescale(chain, sigma1, sigma2, pi1)

Arguments

chain

Chain obtained using Chain

sigma1

Standard deviation of first Gaussian

sigma2

Standard deviation of second Gaussian

pi1

Weight of first Gaussian

Value

a list containing the following

Examples

## Not run: 
  ## Needs previous call to `BayesFluxR_setup` which is time
  ## consuming and requires Julia and BayesFlux.jl
  BayesFluxR_setup(installJulia=TRUE, seed=123)
  net <- Chain(Dense(5, 1))
  like <- likelihood.feedforward_normal(net, Gamma(2.0, 0.5))
  prior <- prior.mixturescale(net, 10, 0.1, 0.5)
  init <- initialise.allsame(Normal(0, 0.5), like, prior)
  x <- matrix(rnorm(5*100), nrow = 5)
  y <- rnorm(100)
  bnn <- BNN(x, y, like, prior, init)
  sampler <- sampler.SGLD()
  ch <- mcmc(bnn, 10, 1000, sampler)

## End(Not run)


[Package BayesFluxR version 0.1.3 Index]