Reference / binference.io.to_datatree

binference.io.to_datatree

binference.io.to_datatree(result)[source]

Convert to an xarray.DataTree with posterior and sample_stats groups.

Follows the ArviZ (>= 1.0) layout: dimensions chain, draw and bin, with the bins’ centres as numeric coordinates (bin_center, or bin_center_<d> per axis of a grid), hyperparameter draws in the posterior, and the NUTS statistics under ArviZ’s names (acceptance_rate, n_steps, boolean diverging). Requires xarray >= 2024.10.

Parameters:
resultPopulationResult

The result.