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

Defaultn_adapts and discard_initial to zero #124

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ uuid = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
keywords = ["markov chain monte carlo", "probablistic programming"]
license = "MIT"
desc = "A lightweight interface for common MCMC methods."
version = "4.4.2"
version = "4.4.3"

[deps]
BangBang = "198e06fe-97b7-11e9-32a5-e1d131e6ad66"
Expand Down
8 changes: 8 additions & 0 deletions src/sample.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function mcmcsample(
progress=PROGRESS[],
progressname="Sampling",
callback=nothing,
n_adapts=0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n_adapts is not a general thing (in contrast to discard_initial), so my feeling is this should not be specified in AbstractMCMC but downstream packages where it is relevant.

discard_initial=0,
thinning=1,
chain_type::Type=Any,
Expand Down Expand Up @@ -209,6 +210,7 @@ function mcmcsample(
progress=PROGRESS[],
progressname="Convergence sampling",
callback=nothing,
n_adapts=0,
discard_initial=0,
thinning=1,
kwargs...,
Expand Down Expand Up @@ -287,6 +289,8 @@ function mcmcsample(
N::Integer,
nchains::Integer;
progress=PROGRESS[],
n_adapts=0,
discard_initial=0,
progressname="Sampling ($(min(nchains, Threads.nthreads())) threads)",
init_params=nothing,
kwargs...,
Expand Down Expand Up @@ -395,6 +399,8 @@ function mcmcsample(
::MCMCDistributed,
N::Integer,
nchains::Integer;
n_adapts=0,
discard_initial=0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed - the keyword arguments are forwarded to the single-chain version and there a default of 0 is already specified.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same is true for the other ensemble algorithms.

progress=PROGRESS[],
progressname="Sampling ($(Distributed.nworkers()) processes)",
init_params=nothing,
Expand Down Expand Up @@ -490,6 +496,8 @@ function mcmcsample(
::MCMCSerial,
N::Integer,
nchains::Integer;
n_adapts=0,
discard_initial=0,
progressname="Sampling",
init_params=nothing,
kwargs...,
Expand Down
Loading