David Widmann

Results 1467 comments of David Widmann

Isn't the `logpdf` implementation incorrect and should rather be something like ```julia Distributions.logpdf(d::Determin, x) = x == d.T ? zero(float(x)) : oftype(float(x), -Inf) ``` ? I haven't performed any debugging...

BTW regardless of your problem with `Determin` you can simplify (and probably speed up) your model by implementing it as ```julia @model function model1(a) ma ~ Normal(0.0, 0.5) a ~...

I quickly ran your model with ```julia b ~ Normal(-exp(-2*ma), 0) ``` instead of ```julia b ~ Determin(-exp(-2*ma)) ``` and as I assumed basically all samples of the HMC sampler...

Maybe I'm missing something here, but doesn't `generated_quantities` above provide this functionality? So you are wondering where to put it? IMO it could also be put into DynamicPPL (which does...

> Regarding log prob, I’m aware that this should be possible I was merely asking to add an additional interface function for users that does that. I was only referring...

> Weell, last time I checked, `setval!` and others _implicitly_ depends on `MCMCChains.jl` by making certain assumptions about the indexing behaviour of `AbstractMCMC.AbstractChains` (which is not enforced/informed in `AbstractMCMC.jl`) confused...

I thought more, we could change `generated_quantities` such that this is done automatically (so users don't have to care about it).

Yes, or even return results as a matrix instead (corresponding to the structure of Chains).

Could we add the following to DynamicPPL (or something similar that works, it is untested :stuck_out_tongue:)? ```julia function generated_quantities(model::Model, chain::AbstractChains) varinfo = VarInfo(model) iters = Iterators.product(1:size(chain, 1), 1:size(chain, 3)) return...

Maybe it would make sense to not flatten the values? E.g. as a ComponentArray (or ComponentMatrix, to be precise)?