bebi103.viz.predictive_ecdf

bebi103.viz.predictive_ecdf(samples, data=None, diff=None, percentiles=(95, 68), color='blue', data_color='orange', data_staircase=True, data_size=2, x=None, discrete=False, p=None, **kwargs)

Plot a predictive ECDF from samples.

Parameters
  • samples (Numpy array or xarray, shape (n_samples, n) or xarray DataArray) – A Numpy array containing predictive samples.

  • data (Numpy array, shape (n,) or xarray DataArray, or None) – If not None, ECDF of measured data is overlaid with predictive ECDF.

  • diff ('ecdf', 'iecdf', 'eppf', or None, default None) – Referring to the variable as x, if diff is ‘iecdf’ or ‘eppf’, for each value of the ECDF, plot the value of x minus the median x. If ‘ecdf’, plot the value of the ECDF minus the median ECDF value. If None, just plot the ECDFs.

  • percentiles (list or tuple, default (95, 68)) – Percentiles for making colored envelopes for confidence intervals for the predictive ECDFs. Maximally four can be specified.

  • color (str, default 'blue') – One of [‘green’, ‘blue’, ‘red’, ‘gray’, ‘purple’, ‘orange’]. There are used to make the color scheme of shading of percentiles.

  • data_color (str, default 'orange') – String representing the color of the data to be plotted over the confidence interval envelopes.

  • data_staircase (bool, default True) – If True, plot the ECDF of the data as a staircase. Otherwise plot it as dots.

  • data_size (int, default 2) – Size of marker (if data_line if False) or thickness of line (if data_staircase is True) of plot of data.

  • x (Numpy array, default None) – Points at which to evaluate the ECDF. If None, points are automatically generated based on the data range.

  • discrete (bool, default False) – If True, the samples take on discrete values.

  • p (bokeh.plotting.Figure instance, or None (default)) – If None, create a new figure. Otherwise, populate the existing figure p.

  • kwargs – All other kwargs are passed to bokeh.plotting.figure().

Returns

output – Figure populated with glyphs describing range of values for the ECDF of the samples. The shading goes according to percentiles of samples of the ECDF, with the median ECDF plotted as line in the middle.

Return type

Bokeh figure