Skip to content

Instantly share code, notes, and snippets.

View JasonPekos's full-sized avatar

Jason Pekos JasonPekos

View GitHub Profile
using Turing, HiddenMarkovModels
using PosteriorDB
using Makie, CairoMakie
using LinearAlgebra, LogExpFunctions
using DataFrames
# Get the dataset and validated reference draws from PosteriorDB
pdb = PosteriorDB.database() # Data import
data = PosteriorDB.load(PosteriorDB.dataset(pdb, "hmm_example"))
ref_post = DataFrame(PosteriorDB.load(PosteriorDB.reference_posterior(pdb, "hmm_example-hmm_example")))
#=
Neal's funnel
https://mc-stan.org/docs/2_29/stan-users-guide/reparameterization.html#ref-papa-et-al:2007
=#
using Turing, StatsPlots, Distributions, DataFrames
gr() # set backend
@model function Neal()