Skip to content

Add gp util module to docs #7763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/api/gp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Gaussian Processes
gp/implementations
gp/mean
gp/cov
gp/util
9 changes: 9 additions & 0 deletions docs/source/api/gp/util.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
************
GP Utilities
************

.. automodule:: pymc.gp.util
.. autosummary::
:toctree: generated

plot_gp_dist
20 changes: 10 additions & 10 deletions pymc/gp/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,30 +178,30 @@ def plot_gp_dist(

Parameters
----------
ax: axes
ax : axes
Matplotlib axes.
samples: numpy.ndarray
samples : numpy.ndarray
Array of S posterior predictive sample from a GP.
Expected shape: (S, X)
x: numpy.ndarray
x : numpy.ndarray
Grid of X values corresponding to the samples.
Expected shape: (X,) or (X, 1), or (1, X)
plot_samples: bool
plot_samples : bool
Plot the GP samples along with posterior (defaults True).
palette: str
palette : str
Palette for coloring output (defaults to "Reds").
fill_alpha: float
fill_alpha : float
Alpha value for the posterior interval fill (defaults to 0.8).
samples_alpha: float
samples_alpha : float
Alpha value for the sample lines (defaults to 0.1).
fill_kwargs: dict
fill_kwargs : dict
Additional arguments for posterior interval fill (fill_between).
samples_kwargs: dict
samples_kwargs : dict
Additional keyword arguments for samples plot.

Returns
-------
ax: Matplotlib axes
ax : Matplotlib axes
"""
import matplotlib.pyplot as plt

Expand Down