Closed TTitscher closed 2 years ago
Thanks for integrating this method here, Thomas. I would prefer to use shape instead of alpha avoiding to mixing these things up again ;) In the resukt summary sd is based on the mean precision or is that the standard deviation of the gamma distribution??
Thanks for your comments! Indeed, "sd" in the context of "gamma for the precision" can be confusing. In the summary, it is really 'just' the standard deviation of the gamma distribution, so the sd of the precision.
If you provide summary(gamma_as_sd=True)
, the quantiles are transformed by 1/x**0.5, such that the mean then refers to the mean of the standard deviation distribution. But mathematically, this may only be correct for the mean, not for the other quantiles.
Do we find a better way do deal with this separation of:
?
As discussed by @aradermacher and @ajafarihub, a reasonable definition of the (prior for the) gamma noise distribution is based on two quantiles. This is the main content of this PR, e.g.
In the context of VB, the gamma distribution is used to model the noise precision. In practice, it can be convenient to generate this distribution from the standard deviation (SD). So the line above is identical to
IMO, this is a bit sketchy as those not actually the quantiles of an inverted squared gamma distribution...
Also there is VBResult.summary: