to_arviz_inference_data()

to_arviz_inference_data()#

liesel.experimental.arviz.to_arviz_inference_data(results, include_warmup=False)[source]#

Converts goose’s SamplingResults into an ArviZ DataTree.

Posterior and warmup samples are stored in the groups "posterior" and "warmup_posterior". By default, all summaries and plots use only the data in the group "posterior".

Parameters:
  • results (SamplingResults) – The sampling results.

  • include_warmup (bool, default: False) – Whether to include the warmup in the returned object.

Return type:

DataTree

Returns:

The ArviZ DataTree.

Notes

The returned object has a variable for each position key included in the SamplingResult object. These are usually the position keys of the sampled parameters. Goose can track more values if specified in the field position_included. This might be helpful to let arviz calculate information criteria like WAIC. Assuming that the position key loglik_pointwise corresponds to the point-wise evaluated log-likelihood, move it into an ArviZ "log_likelihood" group before computing information criteria such as WAIC.