Skip to content

Commit c709abf

Browse files
Remove auto argument from pm.Deterministic docstring (#6592)
* Remove auto argument from Deterministic * Add missing arguments in the deterministic docstring as per numpydoc style guide * Add missing arguments in the Potential docstring * Add spaces around colons --------- Co-authored-by: Michael Osthege <[email protected]>
1 parent 9836d00 commit c709abf

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

pymc/model.py

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,6 +1967,25 @@ def Deterministic(name, var, model=None, dims=None):
19671967
they don't add randomness to the model. They are generally used to record
19681968
an intermediary result.
19691969
1970+
Parameters
1971+
----------
1972+
name : str
1973+
Name of the deterministic variable to be registered in the model.
1974+
var : tensor_like
1975+
Expression for the calculation of the variable.
1976+
model : Model, optional
1977+
The model object to which the Deterministic variable is added.
1978+
If ``None`` is provided, the current model in the context stack is used.
1979+
dims : str or tuple of str, optional
1980+
Dimension names for the variable.
1981+
1982+
Returns
1983+
-------
1984+
var : tensor_like
1985+
The registered, named variable wrapped in Deterministic.
1986+
1987+
Examples
1988+
--------
19701989
Indeed, PyMC allows for arbitrary combinations of random variables, for
19711990
example in the case of a logistic regression
19721991
@@ -2007,19 +2026,6 @@ def Deterministic(name, var, model=None, dims=None):
20072026
of times during a NUTS step, the Deterministic quantities are just
20082027
computeed once at the end of the step, with the final values of the other
20092028
random variables.
2010-
2011-
Parameters
2012-
----------
2013-
name: str
2014-
var: PyTensor variables
2015-
auto: bool
2016-
Add automatically created deterministics (e.g., when imputing missing values)
2017-
to a separate model.auto_deterministics list for filtering during sampling.
2018-
2019-
2020-
Returns
2021-
-------
2022-
var: var, with name attribute
20232029
"""
20242030
model = modelcontext(model)
20252031
var = var.copy(model.name_for(name))
@@ -2059,7 +2065,9 @@ def Potential(name, var, model=None, dims=None):
20592065
Expression to be added to the model joint logp.
20602066
model : Model, optional
20612067
The model object to which the potential function is added.
2062-
If ``None`` is provided, the current model is used.
2068+
If ``None`` is provided, the current model in the context stack is used.
2069+
dims : str or tuple of str, optional
2070+
Dimension names for the variable.
20632071
20642072
Returns
20652073
-------

0 commit comments

Comments
 (0)