SensitivityPlots.analysis#
- SensitivityPlots.analysis(idata=None, dims=None, aggregation=None, x_sweep_axis='relative', apply_cost_per_unit=True, hdi_prob=0.94, figsize=None, backend=None, return_as_pc=False, line_kwargs=None, hdi_kwargs=None, **pc_kwargs)[source]#
Plot sensitivity analysis sweep results (
idata.sensitivity_analysis["x"]).- Parameters:
- idata
az.InferenceData, optional Override instance data. When provided, an
MMMIDataWrapperis constructed from thisidataand used for this call only.- dims
dict, optional Dimension filters, e.g.
{"channel": ["tv", "radio"]}.- aggregation
dict, optional Aggregation to apply before plotting, e.g.
{"sum": "channel"}or{"mean": ["channel"]}.- x_sweep_axis{“relative”, “absolute”}, default “relative”
"relative"plots sweep multipliers on the x-axis."absolute"scales multipliers by total channel spend/data.- apply_cost_per_unitbool, default
True When
x_sweep_axis="absolute", use spend (True) or raw channel data (False) for x-axis scaling.- hdi_prob
float, default 0.94 Credible interval probability for the HDI band.
- figsize
tuple[float,float], optional Convenience shorthand injected into
figure_kwargs.- backend
str, optional Rendering backend (
"matplotlib","plotly","bokeh").- return_as_pcbool, default
False If True, return the
PlotCollectioninstead of the matplotlib tuple.- line_kwargs
dict, optional Extra keyword arguments forwarded to the mean line visual.
- hdi_kwargs
dict, optional Extra keyword arguments forwarded to the HDI band visual.
- **pc_kwargs
Forwarded to
PlotCollection.grid(). Usecols=/rows=to override the default panel layout.
- idata
- Returns:
tuple[Figure,NDArray[Axes]] orPlotCollection