cuqi.samples.Samples.plot_trace#

Samples.plot_trace(variable_indices=None, exact=None, combined=True, tight_layout=True, **kwargs)#

Creates a traceplot of the samples consisting of 1) a histogram/density plot of the samples and 2) an MCMC chain plot.

Parameters:
  • variable_indices (list, optional) – List of variable indices to plot the autocorrelation for. If no input is given and less than 5 variables exist all are plotted and with more 5 are randomly chosen.

  • exact (array-like, optional) – Exact solution to compare with the samples.

  • combined (bool, default=True) – Flag for combining multiple chains into a single chain. If False, chains will be plotted separately. Note multiple chains are not fully supported yet.

  • tight_layout (bool, default=True) – Improves the layout of the traceplot for multiple variables by calling plt.tight_layout(). Set to False if this causes issues.

  • tool. (Any remaining keyword arguments will be passed to the arviz plotting)

  • https (See)

Returns:

axes

Return type:

matplotlib axes or bokeh figures