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
rstar: (ndraws, nchains, nparams) -> result, other shapes supported indirectly via Tables interface.
Looking at these, I think there's a clear continuum of shapes we can interpret and support: (ndraws[, nchains[, nparams...]]). While bfmi can obviously only support the first 2 dimensions, the others can also support the vector case and trailing param dimensions, as might result from stacking chains of draws of matrix random variables.
Why do this? While a user can always reshape to a 3D array, this is not ideal for arrays with named dimensions/indices, since reshape causes all named dimensions to be lost. e.g.
In ArviZ, which uses DimensionalData.DimArrays to store draws, this requires quite a bit of boilerplate whenever we call one of these methods to reshape for MCMCDiagnosticTools, then unreshape the result, then add back dimensions. The proposed generalization is still unambiguous and allows the functions to be used more ergonomically in such cases.
The text was updated successfully, but these errors were encountered:
Currently the more modern methods support the following shapes:
bfmi
:(ndraws[, nchains]) -> ([nchains,])
mcse
/rhat
/ess
/ess_rhat
:(ndraws, nchains, nparams) -> (nparams,)
rstar
:(ndraws, nchains, nparams) -> result
, other shapes supported indirectly via Tables interface.Looking at these, I think there's a clear continuum of shapes we can interpret and support:
(ndraws[, nchains[, nparams...]])
. Whilebfmi
can obviously only support the first 2 dimensions, the others can also support the vector case and trailing param dimensions, as might result fromstack
ing chains of draws of matrix random variables.Why do this? While a user can always reshape to a 3D array, this is not ideal for arrays with named dimensions/indices, since
reshape
causes all named dimensions to be lost. e.g.In ArviZ, which uses
DimensionalData.DimArray
s to store draws, this requires quite a bit of boilerplate whenever we call one of these methods to reshape for MCMCDiagnosticTools, then unreshape the result, then add back dimensions. The proposed generalization is still unambiguous and allows the functions to be used more ergonomically in such cases.The text was updated successfully, but these errors were encountered: