Hi everyone.
I’m trying to use Turing.jl to fit data to a von Mises circular distribution, and I am having some “stack overflow” issues during the fitting.
This is my (very simple) code (coin flip adaptation):
using Turing
using Distributions
μ = 0; κ = 517
vm = VonMises(μ, κ)
data = rand(vm, 100)
@model model(x) = begin
μ ~ Normal(0, 10)
κ ~ Uniform(450, 550)
N = length(x)
for n in 1:N
x[n] ~ VonMises(μ, κ)
end
end
ϵ = 0.05
τ = 10
iterations = 1000
chain = sample(model(data), HMC(ϵ, τ), iterations, progress=false)
The error is “StackOverflowError: in besselix at SpecialFunctions/LC8dm/src/bessel.jl:583”
Thank you very much in advance.