arviz.
plot_mcse
Plot quantile or local Monte Carlo Standard Error.
Any object that can be converted to an az.InferenceData object Refer to documentation of az.convert_to_dataset for details
Variables to be plotted. Prefix the variables by ~ when you want to exclude them from the plot.
If None (default), interpret var_names as the real variables names. If “like”, interpret var_names as substrings of the real variables names. If “regex”, interpret var_names as regular expressions on the real variables names. A la pandas.filter.
Coordinates of var_names to be plotted. Passed to Dataset.sel
Plot quantile value +/- mcse instead of plotting mcse.
Number of rows and columns. Defaults to None, the rows and columns are automatically inferred.
Figure size. If None it will be defined automatically.
Text size scaling factor for labels, titles and lines. If None it will be autoscaled based on figsize.
Plot mean and sd MCSE as horizontal lines. Only taken into account when errorbar=False.
errorbar=False
Plot rug plot of values diverging or that reached the max tree depth.
Variable in sample stats to use as rug mask. Must be a boolean variable.
Number of points for which to plot their quantile/local ess or number of subsets in the evolution plot.
Class providing the method make_label_vert to generate the labels in the plot titles. Read the Label guide for more details and usage examples.
A 2D array of locations into which to plot the densities. If not supplied, Arviz will create its own array of plot areas (and return it).
kwargs passed to rug plot.
kwargs passed to ax.plot for extra methods lines.
kwargs passed to ax.annotate for extra methods lines labels. It accepts the additional key x to set xy=(text_kwargs["x"], mcse)
x
xy=(text_kwargs["x"], mcse)
Select plotting backend {“matplotlib”,”bokeh”}. Default “matplotlib”.
These are kwargs specific to the backend being used. For additional documentation check the plotting method of the backend.
Call backend show function.
Passed as-is to plt.hist() or plt.plot() function depending on the value of kind.
References
Vehtari et al. (2019) see https://arxiv.org/abs/1903.08008
Examples
Plot quantile Monte Carlo Standard Error.
>>> import arviz as az >>> idata = az.load_arviz_data("centered_eight") >>> coords = {"school": ["Deerfield", "Lawrenceville"]} >>> az.plot_mcse( ... idata, var_names=["mu", "theta"], coords=coords ... )