likelihood.feedforward_tdist {BayesFluxR}R Documentation

Use a t-Distribution likelihood for a Feedforward network

Description

This creates a likelihood of the form

\frac{y_i - net(x_i)}{\sigma} \sim T_\nu\;\forall i=1,...,N

where the x_i is fed through the network in the standard feedforward way.

Usage

likelihood.feedforward_tdist(chain, sig_prior, nu = 30)

Arguments

chain

Network structure obtained using link{Chain}

sig_prior

A prior distribution for sigma defined using Gamma, link{InverGamma}, Truncated, Normal

nu

DF of TDist

Value

see likelihood.feedforward_normal

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_tdist(net, Gamma(2.0, 0.5), nu=8)
  prior <- prior.gaussian(net, 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)
  BNN.totparams(bnn)

## End(Not run)


[Package BayesFluxR version 0.1.3 Index]