From beae49c657ba254079179b12111bde868f2f2e96 Mon Sep 17 00:00:00 2001 From: ricardoV94 Date: Sat, 15 May 2021 17:06:33 +0200 Subject: [PATCH] Clarify type of model variables expected by step methods --- pymc3/step_methods/arraystep.py | 6 +++--- pymc3/step_methods/elliptical_slice.py | 2 +- pymc3/step_methods/hmc/base_hmc.py | 2 +- pymc3/step_methods/hmc/hmc.py | 2 +- pymc3/step_methods/hmc/nuts.py | 2 +- pymc3/step_methods/metropolis.py | 6 +++--- pymc3/step_methods/mlda.py | 2 +- pymc3/step_methods/pgbart.py | 2 +- pymc3/step_methods/sgmcmc.py | 2 +- pymc3/step_methods/slicer.py | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pymc3/step_methods/arraystep.py b/pymc3/step_methods/arraystep.py index f1c31adb8d0..c17bfdd08c9 100644 --- a/pymc3/step_methods/arraystep.py +++ b/pymc3/step_methods/arraystep.py @@ -134,7 +134,7 @@ class ArrayStep(BlockedStep): Parameters ---------- vars: list - List of variables for sampler. + List of value variables for sampler. fs: list of logp Aesara functions allvars: Boolean (default False) blocked: Boolean (default True) @@ -190,7 +190,7 @@ def __init__(self, vars, shared, blocked=True): """ Parameters ---------- - vars: list of sampling variables + vars: list of sampling value variables shared: dict of Aesara variable -> shared variable blocked: Boolean (default True) """ @@ -235,7 +235,7 @@ def __init__(self, vars, shared, blocked=True): """ Parameters ---------- - vars: list of sampling variables + vars: list of sampling value variables shared: dict of Aesara variable -> shared variable blocked: Boolean (default True) """ diff --git a/pymc3/step_methods/elliptical_slice.py b/pymc3/step_methods/elliptical_slice.py index ea88d716598..bbdc6096c56 100644 --- a/pymc3/step_methods/elliptical_slice.py +++ b/pymc3/step_methods/elliptical_slice.py @@ -61,7 +61,7 @@ class EllipticalSlice(ArrayStep): Parameters ---------- vars: list - List of variables for sampler. + List of value variables for sampler. prior_cov: array, optional Covariance matrix of the multivariate Gaussian prior. prior_chol: array, optional diff --git a/pymc3/step_methods/hmc/base_hmc.py b/pymc3/step_methods/hmc/base_hmc.py index df8041ce6d7..81403792614 100644 --- a/pymc3/step_methods/hmc/base_hmc.py +++ b/pymc3/step_methods/hmc/base_hmc.py @@ -66,7 +66,7 @@ def __init__( Parameters ---------- - vars: list of Aesara variables + vars: list of value variables scaling: array_like, ndim = {1,2} Scaling for momentum distribution. 1d arrays interpreted matrix diagonal. diff --git a/pymc3/step_methods/hmc/hmc.py b/pymc3/step_methods/hmc/hmc.py index 950b2ae1470..e0bfbb3a1dc 100644 --- a/pymc3/step_methods/hmc/hmc.py +++ b/pymc3/step_methods/hmc/hmc.py @@ -59,7 +59,7 @@ def __init__(self, vars=None, path_length=2.0, max_steps=1024, **kwargs): Parameters ---------- - vars: list of Aesara variables + vars: list of value variables path_length: float, default=2 total length to travel step_rand: function float -> float, default=unif diff --git a/pymc3/step_methods/hmc/nuts.py b/pymc3/step_methods/hmc/nuts.py index 4efc0c3c14b..fae5535d2fa 100644 --- a/pymc3/step_methods/hmc/nuts.py +++ b/pymc3/step_methods/hmc/nuts.py @@ -114,7 +114,7 @@ def __init__(self, vars=None, max_treedepth=10, early_max_treedepth=8, **kwargs) Parameters ---------- - vars: list of Aesara variables, default all continuous vars + vars: list of value variables, default all continuous vars Emax: float, default 1000 Maximum energy change allowed during leapfrog steps. Larger deviations will abort the integration. diff --git a/pymc3/step_methods/metropolis.py b/pymc3/step_methods/metropolis.py index c9cb58470f7..81d2e0bcab8 100644 --- a/pymc3/step_methods/metropolis.py +++ b/pymc3/step_methods/metropolis.py @@ -131,7 +131,7 @@ def __init__( Parameters ---------- vars: list - List of variables for sampler + List of value variables for sampler S: standard deviation or covariance matrix Some measure of variance to parameterize proposal distribution proposal_dist: function @@ -289,7 +289,7 @@ class BinaryMetropolis(ArrayStep): Parameters ---------- vars: list - List of variables for sampler + List of value variables for sampler scaling: scalar or array Initial scale factor for proposal. Defaults to 1. tune: bool @@ -389,7 +389,7 @@ class BinaryGibbsMetropolis(ArrayStep): Parameters ---------- vars: list - List of variables for sampler + List of value variables for sampler order: list or 'random' List of integers indicating the Gibbs update order e.g., [0, 2, 1, ...]. Default is random diff --git a/pymc3/step_methods/mlda.py b/pymc3/step_methods/mlda.py index 600e8beb4ba..e4158f9c794 100644 --- a/pymc3/step_methods/mlda.py +++ b/pymc3/step_methods/mlda.py @@ -218,7 +218,7 @@ class MLDA(ArrayStepShared): Note this list excludes the model passed to the model argument above, which is the finest available. vars : list - List of variables for sampler + List of value variables for sampler base_sampler : string Sampler used in the base (coarsest) chain. Can be 'Metropolis' or 'DEMetropolisZ'. Defaults to 'DEMetropolisZ'. diff --git a/pymc3/step_methods/pgbart.py b/pymc3/step_methods/pgbart.py index b3b00bfa528..dffe3e31b48 100644 --- a/pymc3/step_methods/pgbart.py +++ b/pymc3/step_methods/pgbart.py @@ -34,7 +34,7 @@ class PGBART(ArrayStepShared): Parameters ---------- vars: list - List of variables for sampler + List of value variables for sampler num_particles : int Number of particles for the conditional SMC sampler. Defaults to 10 max_stages : int diff --git a/pymc3/step_methods/sgmcmc.py b/pymc3/step_methods/sgmcmc.py index 800c2da540c..28f4210457b 100644 --- a/pymc3/step_methods/sgmcmc.py +++ b/pymc3/step_methods/sgmcmc.py @@ -87,7 +87,7 @@ class BaseStochasticGradient(ArrayStepShared): Parameters ---------- vars: list - List of variables for sampler + List of value variables for sampler batch_size`: int Batch Size for each step total_size: int diff --git a/pymc3/step_methods/slicer.py b/pymc3/step_methods/slicer.py index 5651d6e78ac..b45f6096ceb 100644 --- a/pymc3/step_methods/slicer.py +++ b/pymc3/step_methods/slicer.py @@ -35,7 +35,7 @@ class Slice(ArrayStep): Parameters ---------- vars: list - List of variables for sampler. + List of value variables for sampler. w: float Initial width of slice (Defaults to 1). tune: bool