Summary#
- class liesel.goose.Summary(results, additional_chain=None, 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.
Offers two main use cases:
View an overall summary by printing a summary instance, including a summary table of the posterior samples and a summary of sammpling errors.
Programmatically access summary statistics via
quantities[quantity_name][var_name]. Please refer to the documentation of the attributequantitiesfor details.
Additionally, the summary object can be turned into a
DataFrameusingto_dataframe().- Parameters:
results (
SamplingResults) – The sampling results to summarize.additional_chain (
Position(dict[str,Any]) |None, default:None) – can be supplied to add more parameters to the summary output. Must be a position chain which matches chain and time dimension of the posterior chain as returned byget_posterior_samples().hdi_prob (
float, default:0.9) – Level on which to return posterior highest density intervals.selected (
list[str] |None, default:None) – Allow to get a summary only for a subset of the position keys.deselected (
list[str] |None, default:None) – Allow to get a summary only for a subset of the position keys.per_chain (
bool, default:False) – If True, the summary is calculated on a per-chain basis. Certain measures likerhatare not available ifper_chainis True.
Notes
This class is still considered experimental. The API may still undergo larger changes.
Methods
Returns an overview of acceptance probabilities as a dataframe.
aggregate_diagnostics([by])Aggregates effective sample sizes (ESS) and rhat.
error_df([per_chain])Returns an overview of the errors recorded during sampling as a dataframe.
Turns Summary object into a
DataFrameobject.Attributes
Whether results are summarized for individual chains (True), or aggregated over chains (False).
Dict of summarizing quantities.
A dictionary of config settings for this summary object.
Dictionary of meta-information about the mcmc samples used to create this summary object.
Contains error information for each kernel.
A dict, linking parameter names (the keys) to the kernel identifier (the values).
The specific version of Liesel used to produce the results.