You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, pointwise_logdensities(chains::AbstractChains) returns an OrderedDict of Matrices all of the shape (sample x chain).
I find it more convenient to work with the results of the pointwise functions applied to AbstractChains as an AbstractChains again, rather than the OrderedDict{String, Matrix}.
What is a good place to support this conversion? A function in the MCMCChains extension such as:
functionas_chains(lds_pointwise)
Chains(stack(values(lds_pointwise); dims=2), collect(keys(lds_pointwise)))
end
chn =as_chains(logjoints_pointwise); # from @testset "pointwise_logdensities chain"names(chn)
get(chn, :x)[1] == logjoints_pointwise["x"]
One could even think of letting the pointwise_logdensities(..., ::AbstractChains) routinely return a Chains object.
This could be achieved by
renaming the pointwise_logdensities(..., ::AbstractChains) to pointwise_logdensities_dict,
implementing it in the DynamicPPLMCMCChains extension by converting the result of pointwise_logdensities_dict.
What are opinions about this suggestion?
The text was updated successfully, but these errors were encountered:
Currently,
pointwise_logdensities(chains::AbstractChains)
returns anOrderedDict
of Matrices all of the shape (sample x chain).I find it more convenient to work with the results of the pointwise functions applied to
AbstractChains
as anAbstractChains
again, rather than theOrderedDict{String, Matrix}
.What is a good place to support this conversion? A function in the MCMCChains extension such as:
One could even think of letting the
pointwise_logdensities(..., ::AbstractChains)
routinely return aChains
object.This could be achieved by
pointwise_logdensities(..., ::AbstractChains)
topointwise_logdensities_dict
,pointwise_logdensities_dict
.What are opinions about this suggestion?
The text was updated successfully, but these errors were encountered: