Skip to content

Commit

Permalink
Remove auto argument from pm.Deterministic docstring (#6592)
Browse files Browse the repository at this point in the history
* 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 <michael.osthege@outlook.com>
  • Loading branch information
shreyas3156 and michaelosthege authored Mar 14, 2023
1 parent 9836d00 commit c709abf
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions pymc/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1967,6 +1967,25 @@ def Deterministic(name, var, model=None, dims=None):
they don't add randomness to the model. They are generally used to record
an intermediary result.
Parameters
----------
name : str
Name of the deterministic variable to be registered in the model.
var : tensor_like
Expression for the calculation of the variable.
model : Model, optional
The model object to which the Deterministic variable is added.
If ``None`` is provided, the current model in the context stack is used.
dims : str or tuple of str, optional
Dimension names for the variable.
Returns
-------
var : tensor_like
The registered, named variable wrapped in Deterministic.
Examples
--------
Indeed, PyMC allows for arbitrary combinations of random variables, for
example in the case of a logistic regression
Expand Down Expand Up @@ -2007,19 +2026,6 @@ def Deterministic(name, var, model=None, dims=None):
of times during a NUTS step, the Deterministic quantities are just
computeed once at the end of the step, with the final values of the other
random variables.
Parameters
----------
name: str
var: PyTensor variables
auto: bool
Add automatically created deterministics (e.g., when imputing missing values)
to a separate model.auto_deterministics list for filtering during sampling.
Returns
-------
var: var, with name attribute
"""
model = modelcontext(model)
var = var.copy(model.name_for(name))
Expand Down Expand Up @@ -2059,7 +2065,9 @@ def Potential(name, var, model=None, dims=None):
Expression to be added to the model joint logp.
model : Model, optional
The model object to which the potential function is added.
If ``None`` is provided, the current model is used.
If ``None`` is provided, the current model in the context stack is used.
dims : str or tuple of str, optional
Dimension names for the variable.
Returns
-------
Expand Down

0 comments on commit c709abf

Please sign in to comment.