pymc.gp.util.plot_gp_dist#

pymc.gp.util.plot_gp_dist(ax, samples, x, plot_samples=True, palette='Reds', fill_alpha=0.8, samples_alpha=0.1, fill_kwargs=None, samples_kwargs=None)[source]#

Plot 1D GP posteriors from trace.

Parameters:
axaxes

Matplotlib axes.

samplesnumpy.ndarray

Array of S posterior predictive sample from a GP. Expected shape: (S, X)

xnumpy.ndarray

Grid of X values corresponding to the samples. Expected shape: (X,) or (X, 1), or (1, X)

plot_samplesbool

Plot the GP samples along with posterior (defaults True).

palettestr

Palette for coloring output (defaults to “Reds”).

fill_alphafloat

Alpha value for the posterior interval fill (defaults to 0.8).

samples_alphafloat

Alpha value for the sample lines (defaults to 0.1).

fill_kwargsdict

Additional arguments for posterior interval fill (fill_between).

samples_kwargsdict

Additional keyword arguments for samples plot.

Returns:
axMatplotlib axes