SamplesSummary#
- class liesel.goose.SamplesSummary(samples, quantiles=(0.05, 0.5, 0.95), hdi_prob=0.9, selected=None, deselected=None, per_chain=False, which=('mean', 'sd', 'var', 'quantiles', 'hdi', 'ess_bulk', 'ess_tail', 'rhat', 'mcse_mean', 'mcse_sd'))[source]#
Bases:
objectA summary object based on a dictionary of samples.
Offers two main use cases:
- The summary object can be turned into a
DataFrame using
to_dataframe().
- The summary object can be turned into a
Programmatically access summary statistics via
quantities[quantity_name][var_name]. Please refer to the documentation of the attributequantitiesfor details.
- Parameters:
samples (
dict[str,Any]) – The dictionary of samples to summarize.hdi_prob (
float) – Level on which to return posterior highest density intervals. (default:0.9)selected (
list[str] |None) – Allow to get a summary only for a subset of the position keys. (default:None)deselected (
list[str] |None) – Allow to get a summary only for a subset of the position keys. (default:None)per_chain (
bool) – If True, the summary is calculated on a per-chain basis. Certain measures likerhatare not available ifper_chainis True. (default:False)
Notes
This class is still considered experimental. The API may still undergo larger changes.
Methods
from_array(a[, quantiles, hdi_prob, ...])Initializes the summary from an array of samples.
Turns Summary object into a
DataFrameobject.Attributes