SciML / DiffEqBayes.jl

Extension functionality which uses Stan.jl, DynamicHMC.jl, and Turing.jl to estimate the parameters to differential equations and perform Bayesian probabilistic scientific machine learning
https://docs.sciml.ai/DiffEqBayes/stable/
Other
121 stars 29 forks source link

Trying your example #4

Closed goedman closed 7 years ago

goedman commented 7 years ago

Hi @Ayush-iitkgp

I'm trying your example to figure out the filtering issue but where is bayesian_inference coming from?

Rob

ChrisRackauckas commented 7 years ago

https://github.com/JuliaDiffEq/DiffEqBayes.jl/pull/3

goedman commented 7 years ago

julia> sim=bayesian_result.chain_results Object of type "Mamba.Chains"

Iterations = 1:1 Thinning interval = 1 Chains = 1,2,3,4 Samples per chain = 1

[-83.601 0.0 … 0.96472 -1.73374]

[-46.9753 0.0 … 5.07664 -0.439044]

[-32.9746 0.0 … 1.9575 0.511501]

[-44.2234 0.0 … 7.73749 0.510299]

julia> fieldnames(sim) 4-element Array{Symbol,1}: :value :range :names :chains

julia> sim.names 10-element Array{AbstractString,1}: "lp"
"accept_stat" "stepsize"
"treedepth__"
"n_leapfrog
" "divergent"
"energy
"
"sigma.1"
"sigma.2"
"theta.1"

julia> sim[1:10, ["theta.1", "sigma.1"],:] Object of type "Mamba.Chains"

Iterations = 1:1 Thinning interval = 1 Chains = 1,2,3,4 Samples per chain = 1

[-1.73374 1.10297]

[-0.439044 1.91719]

[0.511501 1.52393]

[0.510299 3.86279]

goedman commented 7 years ago

I noticed you had it solved, but just for future reference. I really like the bayesian_inference() setup!