Open itsdfish opened 1 year ago
Absolutely! In fact we are in the process of collecting examples from our research projects and those of others, of challenging posterior distributions for benchmarking, including multimodal ones. Open call for hard posteriors distributions to include in that benchmark set...
...and good point for the doc, we should definitely say that multimodality is one of the use cases.
I am working with a model that might be a good candidate. I'm not quite sure when it will be ready. Would you still be interested in considering a model in the next month or two?
Absolutely!
Definitely! I would be happy to hear about that model + data when it is ready :)
Sorry for the long delay. The model I originally wanted to share is still not ready. However, I can share a similar model which has the benefit of being simpler. The quantum model, which is taken from Pothos & Busemeyer (2009), provides an explanation of the interference effect in the prisoner's dilemma. The documentation for the model can be found here.
The code to generate the plot below is:
using Pigeons
using QuantumPrisonersDilemmaModel
using Random
using StatsPlots
using Turing
Random.seed!(65)
# Generate some data with known parameters
n = 50
model = QPDM(;μd=1.0, γ=2.0)
data = rand(model, n)
# Specify turing model
@model function turing_model(data)
γ ~ Normal(0, 3)
data ~ QPDM(;μd=1.0, γ)
end
# Estimate the parameters
pt = pigeons(
target=TuringLogPotential(turing_model((n, data))),
record=[traces])
samples = Chains(sample_array(pt), ["γ"])
plot(samples)
Here is the posterior distribution of the entanglement parameter:
Please feel free to use this if you think it is a helpful example of multimodal posterior distributions.
Thank you for sharing this example!
That's really cool. We are in the process of curating examples to put in a showcase website, we will be in touch soon!
Hello,
My understanding is that multimodal distributions are a common use case for parallel tempering. I'm assuming that this is true for this particular algorithm in Pigeons.jl. If so, it might be useful to advertise that in the documentation.