Bayesian regression with parametrized basis functions in Turing.jl

Approximately, things on the left hand side of a Turing ~ statement are parameters unless they appear in the argument to the model function.

@model function foo(a,b,c)
   theta ~ Normal(0.0,1.0) # theta is a parameter because doesn't appear in arguments to foo
   a ~ Beta(thingy(theta),thingy(b)) # a is data because it's in the arguments to foo, this is a likelihood term
   c ~ CustomDistribution(theta,a,b) # more likelihood
end

So Turing should do the right thing.

4 Likes