Repository navigation
DEoptimIterative(convergence =): stopping rule as an argument, outside the chunk cache keys - #55
Merged
Merged
Conversation
…outside the per-chunk cache keys deoptimConvergence() resolves argument > clusters.deoptim* option > default; the defaults are defined once in .optionDefaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## development #55 +/- ##
===============================================
+ Coverage 74.53% 75.01% +0.47%
===============================================
Files 22 22
Lines 2101 2113 +12
===============================================
+ Hits 1566 1585 +19
+ Misses 535 528 -7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
eliotmcintire
added a commit
that referenced
this pull request
Oct 16, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fits sometimes stop while the population is still improving. The stopping rule can now be set per call, and a fit that stopped early can be continued with a stricter rule, picking up from the generations it already ran instead of starting over.
Affects: nothing changes unless
convergenceis given; the defaults (300, 350, 1, 0.1) and theclusters.deoptim*options behave as before.Technical details
The stop rule was read from options inside
DEoptimIterative()(R/DEoptim.R:450,.deoptimPopulationConverged()defaults at R/DEoptim.R:557), so a caller could not put it in its own cache key.DEoptimIterative(convergence = list(window, minGenerations, se, sdChange))takes any of the four; the rest come from the options, then from defaults now defined once in.optionDefaults. The exporteddeoptimConvergence()returns the full list.convergenceis a formal ofDEoptimIterative()and is not passed to the per-chunkCache()call, so no chunk key contains it.Test (
tests/testthat/test-DEoptimConvergenceArg.R, fails on development): argument > option > default; and a fit that stopped at 5 generations (minGenerations = 4) rerun withminGenerations = 8on the same cache path replays the 5 cached chunks, makes 32 objective calls (4 new generations x NP 8) and ends at 9 generations. Full tests: 0 failures on the branch and on development;R CMD check --no-manual: 0 errors, 0 warnings, 3 notes (unchanged).🤖 Generated with Claude Code
https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6