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

Differential evaluation crossover_gap = 0 #181

Open
dklong-csu opened this issue Jan 3, 2022 · 4 comments
Open

Differential evaluation crossover_gap = 0 #181

dklong-csu opened this issue Jan 3, 2022 · 4 comments

Comments

@dklong-csu
Copy link
Contributor

If crossover_gap in DifferentialEvaluationMetropolisHastings is equal to 0 -- i.e. if the DE-MC algorithm is always used instead of also having normal metropolis steps -- then the sampler attempts the operation generation % crossover_gap which ends up being generation % 0 and you get a divide by zero error.

@bangerth
Copy link
Owner

I think that the variable is misnamed -- it's the interval, not the gap. If so, then it needs to be a positive number, and we should check that with an assertion.

@dklong-csu
Copy link
Contributor Author

Makes sense, and that aligns with the comment above that comparison. Having crossover_gap=1 would result in "perform crossover every 1 iteration".

@bangerth
Copy link
Owner

We should change the name of the variable, as well as update the documentation. I'll get around to it eventually, but at least now you know what you should choose.

@bangerth
Copy link
Owner

I've also special cased the current behavior to avoid the division by zero, see #188 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants