Skip to content

Commit

Permalink
✏️ Minor docs notation for posterioplot function(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
CloudChaoszero committed Jan 18, 2021
1 parent c90a6f3 commit a4c8f5b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
7 changes: 3 additions & 4 deletions docs/source/api/plots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ library, a general purpose library for
"exploratory analysis of Bayesian models."
Refer to its documentation to use the plotting functions directly.

.. warning::
The `plot_posterior_predictive_glm` function will removed in a future PyMC3 release.
Keep up to date with `ArviZ <https://arviz-devs.github.io/arviz/>`_ for a future equivalent of `plot_posterior_predictive_glm`.
.. currentmodule:: pymc3.plots.posteriorplot

- :func:`pymc3.plot_posterior_predictive_glm <arviz:arviz.plot_trace>`
.. automodule:: pymc3.plots.posteriorplot
:members:
6 changes: 3 additions & 3 deletions pymc3/plots/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021 The PyMC Developers
# Copyright 2020 The PyMC Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,9 +15,9 @@
"""PyMC3 Plotting.
Plots are delegated to the `ArviZ <https://arviz-devs.github.io/arviz/>`_ library, a general purpose library for
"exploratory analysis of Bayesian models." For more details, see https://arviz-devs.github.io/arviz/
exploratory analysis of Bayesian models. For more details, see https://arviz-devs.github.io/arviz/.
Only the `plot_posterior_predictive_glm` is kept in the PyMC code base for now, but it'll will move to ArviZ once the latter adds features for regression plot.
Only `plot_posterior_predictive_glm` is kept in the PyMC code base for now, but it will move to ArviZ once the latter adds features for regression plots.
"""
import functools
import sys
Expand Down
32 changes: 19 additions & 13 deletions pymc3/plots/posteriorplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,25 @@ def plot_posterior_predictive_glm(
**kwargs: Any
) -> None:
"""Plot posterior predictive of a linear model.
:Arguments:
trace: InferenceData or MultiTrace
Output of pm.sample()
eval: <array>
Array over which to evaluate lm
lm: function <default: linear function>
Function mapping parameters at different points
to their respective outputs.
input: point, sample
output: estimated value
samples: int <default=30>
How many posterior samples to draw.
Additional keyword arguments are passed to pylab.plot().
Parameters
----------
trace: InferenceData or MultiTrace
Output of pm.sample()
eval: <array>
Array over which to evaluate lm
lm: function <default: linear function>
Function mapping parameters at different points
to their respective outputs.
input: point, sample
output: estimated value
samples: int <default=30>
How many posterior samples to draw.
kwargs : mapping, optional
Additional keyword arguments are passed to ``matplotlib.pyplot.plot()``.
Warnings
--------
The `plot_posterior_predictive_glm` function will removed in a future PyMC3 release.
"""
warnings.warn(
"The `plot_posterior_predictive_glm` function will migrate to Arviz in a future release. "
Expand Down

0 comments on commit a4c8f5b

Please sign in to comment.