BayesianTools icon indicating copy to clipboard operation
BayesianTools copied to clipboard

Documentation DE-Sampler / nrChains

Open stefan-paul opened this issue 11 months ago • 3 comments

It seems that the documentation of the DE sampler is a bit confusing. According to the documentation the parameter "startValue" can be used to define the number of chains. However, the following code ends in an insufficient starting population:

## Example Code (based on ?runMCMC)
## Generate a test likelihood function. 
ll <- generateTestDensityMultiNormal(sigma = "no correlation")

## Create a BayesianSetup object from the likelihood 
## is the recommended way of using the runMCMC() function.
bayesianSetup <- createBayesianSetup(likelihood = ll, lower = rep(-10, 3), upper = rep(10, 3))


## Run the sampler with number of chains defined
settings = list(iterations = 5000, startValue = 3)
out <- runMCMC(bayesianSetup = bayesianSetup, sampler = "DE", settings = settings)
plot(out)  

Additionally, the parameter "nrChains" is not listed as a parameter of the DE sampler.

stefan-paul avatar Feb 20 '25 13:02 stefan-paul