Closed denisshepelin closed 5 years ago
Hi @denisshepelin you are trying to redo a lot of what this package is meant for actually. BTW we moved away from using IS
as the default sampler to NUTS
now https://github.com/JuliaDiffEq/DiffEqBayes.jl/blob/master/src/turing_inference.jl#L4, that said you can pass the sampler you want with the sampler
arg in turing_inference
. Using turing_inference
would make your life a bit easier I guess. https://github.com/JuliaDiffEq/DiffEqTutorials.jl/blob/master/tutorials/models/06-pendulum_bayesian_inference.jmd is a good reference on how to use it.
turing_inference(prob, Tsit5(), tp, newsol, [Normal(1.0, 0.2), Normal(0.5, 0.2),Normal(0.5, 0.2), Normal(0.1, 0.1)];syms=[:alpha,:beta, :gamma, :delta],sampler=HMC(1000, 0.1, 5))
this works for me.
You should try ]up
once as some of your packages are out of date, that will probably fix the problem.
I've just noted recent update of turing_inference
, tried it on my simple example and it worked very nicely!
Cool! I'll close this issue then. Do ping in Slack or open an issue if you face any more problems.
Dear all, I'm trying to build a Turing-first simple example with estimation of ODE parameters using HMC sampler.
My environment with Julia
1.1.1
:So far the code looks like this:
This code is a very close adaptation of how Turing based inference works in DiffEqBayes but with different sampler (HMC instead of IS). Unfortunately this code is not working at the stage of sampling. The error is the following:
I've tried to fill issue on the Turing side (https://github.com/TuringLang/Turing.jl/issues/810) but the error seem to be DifferentialEquations.jl specific. I will appreciate any help. Thank you