-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Description
Consider this example:
@model function mymodel(x)
σ ~ LogNormal()
a ~ Normal()
c ~ Normal()
b ~ Normal()
x .~ Normal(a+b+c, σ)
end
model = mymodel(randn(1000))
ch = sample(model, NUTS(0.65), 100)
plot(ch)
This plots the parameters in the order σ
, a
, c
, b
. This matches the order of parameters in the underlying AxisArray. However, retrieving the parameter list with names
gives a different order:
julia> names(ch, :parameters)
4-element Vector{Symbol}:
:a
:b
:σ
:c
My use case: I want to add things on the plots created by plot(ch)
. To modify the plot for the ith parameter I can do plot!(..., subplot=2i)
. But I can't find a good way to get the list of parameters in the right order...
Metadata
Metadata
Assignees
Labels
No labels