summarise_by_samples()#
- liesel_gam.summarise_by_samples(key, a, name='value', n=100)[source]#
Summarizes an array of posterior samples via subsamples.
- Parameters:
key (
Array) – Jax key-array (created byjax.random.key) for drawing subsamples.a (
Array|ndarray|bool|number|bool|int|float|complex) – The array to be summarized, assumed to have shape(C, S, N), whereCis the number of MCMC chains,Sis the number of samples, andNis the dimension of the quantity to summarize. Arrays of shape(C, S)are currently not supported by this function.name (
str, default:'value') – Column name for the value column in the returned dataframe.n (
int, default:100) – Number of subsamples to draw froma.
- Return type:
- Returns:
A dataframe with the following columns:
value: sample value
index: index of the flattened array
sample: sample number
obs: observation number (enumerates quantity dimension,
N)chain: chain number