Skip to content

Commit 81bcd1a

Browse files
jmloyolatwiecki
authored andcommitted
Fix online documentation and docstring mainly of Data container class (#3427)
* Add new line to notebook so it renders correctly * Remove commented lines so the online docs compile correctly * Fix link to online documentation and example usage in docstring * Fix typo in documentation * Remove CommonMark from requirements-dev.txt
1 parent 6b25adf commit 81bcd1a

File tree

6 files changed

+4
-6
lines changed

6 files changed

+4
-6
lines changed

docs/source/Advanced_usage_of_Theano_in_PyMC3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ be time consuming if the number of datasets is large)::
3030
observed_data = [mu + np.random.randn(20) for mu in true_mu]
3131

3232
data = theano.shared(observed_data[0])
33-
pm.Model() as model:
33+
with pm.Model() as model:
3434
mu = pm.Normal('mu', 0, 10)
3535
pm.Normal('y', mu=mu, sigma=1, observed=data)
3636

docs/source/notebooks/data_container.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@
235235
"metadata": {},
236236
"source": [
237237
"The methods and functions related to the Data container class are:\n",
238+
"\n",
238239
"- `data_container.get_value` (method inherited from the theano SharedVariable): gets the value associated with the `data_container`.\n",
239240
"- `data_container.set_value` (method inherited from the theano SharedVariable): sets the value associated with the `data_container`.\n",
240241
"- `pm.set_data`: PyMC3 function that sets the value associated with each Data container variable indicated in the dictionary `new_data` with it corresponding new value."

docs/source/notebooks/table_of_contents_examples.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ Gallery.contents = {
3939
"gaussian_mixture_model": "Mixture Models",
4040
"marginalized_gaussian_mixture_model": "Mixture Models",
4141
"SMC2_gaussians": "Simulation-based Inference",
42-
// "bayesian_neural_network_with_sgfs": "Stochastic Gradients", Moved to pymc3-experimental
43-
// "constant_stochastic_gradient": "Stochastic Gradients", Moved to pymc3-experimental
44-
// "sgfs_simple_optimization": "Stochastic Gradients", Moved to pymc3-experimental
4542
"bayes_param_survival_pymc3": "Survival Analysis",
4643
"censored_data": "Survival Analysis",
4744
"survival_analysis": "Survival Analysis",

pymc3/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ class Data:
426426
... traces.append(pm.sample())
427427
428428
To set the value of the data container variable, check out
429-
:func:`pm.set_data()`.
429+
:func:`pymc3.model.set_data()`.
430430
431431
For more information, take a look at this example notebook
432432
https://docs.pymc.io/notebooks/data_container.html

pymc3/model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,7 @@ def set_data(new_data, model=None):
10831083
Set the value of `x` to predict on new data.
10841084
10851085
.. code:: ipython
1086+
10861087
>>> with model:
10871088
... pm.set_data({'x': [5,6,9]})
10881089
... y_test = pm.sample_posterior_predictive(trace)

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
arviz
22
bokeh>=0.12.13
3-
CommonMark==0.5.4
43
graphviz>=0.8.3
54
h5py>=2.7.0
65
ipython

0 commit comments

Comments
 (0)