plot_pairs()#
- liesel.goose.summary_viz.plot_pairs(results, params=None, param_indices=None, chain_indices=None, max_chains=5, alpha=0.2, title=None, title_spacing=0.9, style='whitegrid', diag_kind='kde', color_palette=None, height=3, aspect_ratio=1, save_path=None, include_warmup=False)[source]#
Produces a pairplot panel.
- Parameters:
results (
SamplingResults
) – Result object of the sampling process. Must have a methodget_posterior_samples()
which extracts all samples from the posterior distribution.params (
Union
[str
,list
[str
],None
]) – Names of the model parameters that are contained in the plot. Must coincide with the dictionary keys of thePosition
with the posterior samples. IfNone
, all parameters are included. (default:None
)param_indices (
Union
[int
,Sequence
[int
],None
]) – Indices of each model parameter that are contained in the plot. Selects e.g.beta[0]
out of abeta
parameter vector. A single index can be specified as an integer or a sequence containing one integer. IfNone
, all subparameters are included. (default:None
)chain_indices (
Union
[int
,Sequence
[int
],None
]) – Indices of chains for each model subparameter that are contained in the plot. Selects e.g. chain 0 and chain 2 out of multiple chains. A single index can be specified as an integer or a sequence containing one integer. IfNone
, all chains are included. (default:None
)max_chains (
int
|None
) – Upper bound how many chains are included within each subplot/facet. Avoids overplotting. IfNone
, all chains contained in theresults
input are plotted. Always starts chain selection from the lowest chain index upwards. For selecting specific chains use the argumentchain_indices
. (default:5
)alpha (
float
) – Amount of transparency; a float between 0 and 1. (default:0.2
)title_spacing (
float
) – Determines the margin/whitespace between the plot title (set withfig.suptitle()
) and the first row of subplots/facets. Passed to thetop
argument offig.subplots_adjust()
. (default:0.9
)style (
str
) – Passed to thestyle
argument ofsns.set_theme()
. Valid options aredarkgrid
,whitegrid
,dark
,white
, andticks
. (default:'whitegrid'
)diag_kind (
str
) – Kind of plot for the diagonal subplots. Can be ‘kde’ (default) for kernel density estimates or ‘hist’ for histograms. (default:'kde'
)color_palette (
Union
[str
,list
[str
],dict
[int
,str
],None
]) – Passed to the palette argument ofsns.pairplot()
. String values must be valid inputs ofsns.color_palette()
such as a seaborn color palette or a matplotlib colormap. Custom colors can be set with a list of color strings or a dictionary with the chain indices as keys and color strings as values. The number of color strings must coincide with the number of plotted chains. IfNone
, the defaulttab10
matplotlib colormap is chosen. (default:None
)height (
int
) – Height in inches of each subplot/facet within the grid. (default:3
)aspect_ratio (
int
) – Ratio of width / height of each subplot/facet within the grid, i.e.width = aspect_ratio * height
. (default:1
)legend_position – Determines the color legend position. Coordinates are relative to the upper panel within the plot grid. The first coordinate specifies the horizontal, the second coordinate the vertical position. Might require an adjustment when changing the
figure_size
values or the number of chains.save_path (
Optional
[str
]) – File path where the plot is saved. (default:None
)include_warmup (
bool
) – Include the warmup samples in the trace plot. (default:False
)