Skip to content

Commit 5c08d92

Browse files
committed
Changed sampling defaults and cleaned typos
1 parent 6699447 commit 5c08d92

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

pymc3/sampling.py

+15-15
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def _print_step_hierarchy(s, level=0):
228228

229229

230230
def sample(
231-
draws=500,
231+
draws=1000,
232232
step=None,
233233
init="auto",
234234
n_init=200000,
@@ -237,7 +237,7 @@ def sample(
237237
chain_idx=0,
238238
chains=None,
239239
cores=None,
240-
tune=500,
240+
tune=2000,
241241
progressbar=True,
242242
model=None,
243243
random_seed=None,
@@ -253,7 +253,7 @@ def sample(
253253
Parameters
254254
----------
255255
draws: int
256-
The number of samples to draw. Defaults to 500. The number of tuned samples are discarded
256+
The number of samples to draw. Defaults to 1000. The number of tuned samples are discarded
257257
by default. See ``discard_tuned_samples``.
258258
init: str
259259
Initialization method to use for auto-assigned NUTS samplers.
@@ -305,7 +305,7 @@ def sample(
305305
The number of chains to run in parallel. If ``None``, set to the number of CPUs in the
306306
system, but at most 4.
307307
tune: int
308-
Number of iterations to tune, defaults to 500. Samplers adjust the step sizes, scalings or
308+
Number of iterations to tune, defaults to 2000. Samplers adjust the step sizes, scalings or
309309
similar during tuning. Tuning samples will be drawn in addition to the number specified in
310310
the ``draws`` argument, and will be discarded unless ``discard_tuned_samples`` is set to
311311
False.
@@ -362,7 +362,7 @@ def sample(
362362
>>> with pm.Model() as model: # context management
363363
... p = pm.Beta('p', alpha=alpha, beta=beta)
364364
... y = pm.Binomial('y', n=n, p=p, observed=h)
365-
... trace = pm.sample(2000, tune=1000, cores=4)
365+
... trace = pm.sample()
366366
>>> pm.summary(trace)
367367
mean sd mc_error hpd_2.5 hpd_97.5
368368
p 0.604625 0.047086 0.00078 0.510498 0.694774
@@ -1103,10 +1103,10 @@ def step(self, tune_stop, population):
11031103

11041104

11051105
def _prepare_iter_population(
1106-
draws:int,
1107-
chains:list,
1106+
draws: int,
1107+
chains: list,
11081108
step,
1109-
start:list,
1109+
start: list,
11101110
parallelize:bool,
11111111
tune=None,
11121112
model=None,
@@ -1303,14 +1303,14 @@ def _choose_backend(trace, chain, shortcuts=None, **kwds):
13031303

13041304

13051305
def _mp_sample(
1306-
draws:int,
1307-
tune:int,
1306+
draws: int,
1307+
tune: int,
13081308
step,
1309-
chains:int,
1310-
cores:int,
1311-
chain:int,
1312-
random_seed:list,
1313-
start:list,
1309+
chains: int,
1310+
cores: int,
1311+
chain: int,
1312+
random_seed: list,
1313+
start: list,
13141314
progressbar=True,
13151315
trace=None,
13161316
model=None,

0 commit comments

Comments
 (0)