Skip to content
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

Change draws and tune defaults to 1000 in pm.sample #3855

Merged
merged 4 commits into from
Mar 30, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions pymc3/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def _print_step_hierarchy(s, level=0):


def sample(
draws=500,
draws=1000,
step=None,
init="auto",
n_init=200000,
Expand All @@ -237,7 +237,7 @@ def sample(
chain_idx=0,
chains=None,
cores=None,
tune=500,
tune=2000,
progressbar=True,
model=None,
random_seed=None,
Expand All @@ -253,7 +253,7 @@ def sample(
Parameters
----------
draws: int
The number of samples to draw. Defaults to 500. The number of tuned samples are discarded
The number of samples to draw. Defaults to 1000. The number of tuned samples are discarded
by default. See ``discard_tuned_samples``.
init: str
Initialization method to use for auto-assigned NUTS samplers.
Expand Down Expand Up @@ -305,7 +305,7 @@ def sample(
The number of chains to run in parallel. If ``None``, set to the number of CPUs in the
system, but at most 4.
tune: int
Number of iterations to tune, defaults to 500. Samplers adjust the step sizes, scalings or
Number of iterations to tune, defaults to 2000. Samplers adjust the step sizes, scalings or
similar during tuning. Tuning samples will be drawn in addition to the number specified in
the ``draws`` argument, and will be discarded unless ``discard_tuned_samples`` is set to
False.
Expand Down Expand Up @@ -362,7 +362,7 @@ def sample(
>>> with pm.Model() as model: # context management
... p = pm.Beta('p', alpha=alpha, beta=beta)
... y = pm.Binomial('y', n=n, p=p, observed=h)
... trace = pm.sample(2000, tune=1000, cores=4)
... trace = pm.sample()
>>> pm.summary(trace)
mean sd mc_error hpd_2.5 hpd_97.5
p 0.604625 0.047086 0.00078 0.510498 0.694774
Expand Down Expand Up @@ -1103,10 +1103,10 @@ def step(self, tune_stop, population):


def _prepare_iter_population(
draws:int,
chains:list,
draws: int,
chains: list,
step,
start:list,
start: list,
parallelize:bool,
tune=None,
model=None,
Expand Down Expand Up @@ -1303,14 +1303,14 @@ def _choose_backend(trace, chain, shortcuts=None, **kwds):


def _mp_sample(
draws:int,
tune:int,
draws: int,
tune: int,
step,
chains:int,
cores:int,
chain:int,
random_seed:list,
start:list,
chains: int,
cores: int,
chain: int,
random_seed: list,
start: list,
progressbar=True,
trace=None,
model=None,
Expand Down