Skip to content

Updating docstring of a class according to PEP 257 in a file #4449

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 9 commits into from
Jan 31, 2021
46 changes: 23 additions & 23 deletions pymc3/step_methods/metropolis.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,29 +95,7 @@ def __call__(self, num_draws=None):


class Metropolis(ArrayStepShared):
"""
Metropolis-Hastings sampling step

Parameters
----------
vars: list
List of variables for sampler
S: standard deviation or covariance matrix
Some measure of variance to parameterize proposal distribution
proposal_dist: function
Function that returns zero-mean deviates when parameterized with
S (and n). Defaults to normal.
scaling: scalar or array
Initial scale factor for proposal. Defaults to 1.
tune: bool
Flag for tuning. Defaults to True.
tune_interval: int
The frequency of tuning. Defaults to 100 iterations.
model: PyMC Model
Optional model for sampling step. Defaults to None (taken from context).
mode: string or `Mode` instance.
compilation mode passed to Theano functions
"""
"""Metropolis-Hastings sampling step"""

name = "metropolis"

Expand All @@ -144,6 +122,28 @@ def __init__(
mode=None,
**kwargs
):
"""Create an instance of a Metropolis stepper

Parameters
----------
vars: list
List of variables for sampler
S: standard deviation or covariance matrix
Some measure of variance to parameterize proposal distribution
proposal_dist: function
Function that returns zero-mean deviates when parameterized with
S (and n). Defaults to normal.
scaling: scalar or array
Initial scale factor for proposal. Defaults to 1.
tune: bool
Flag for tuning. Defaults to True.
tune_interval: int
The frequency of tuning. Defaults to 100 iterations.
model: PyMC Model
Optional model for sampling step. Defaults to None (taken from context).
mode: string or `Mode` instance.
compilation mode passed to Theano functions
"""

model = pm.modelcontext(model)

Expand Down