diff --git a/pymc3/step_methods/metropolis.py b/pymc3/step_methods/metropolis.py index fa5040e5a1..76804db2f8 100644 --- a/pymc3/step_methods/metropolis.py +++ b/pymc3/step_methods/metropolis.py @@ -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" @@ -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)