Skip to content

runDEoptim(convergence =): stopping rule as a fit setting in the cache key - #162

Merged
eliotmcintire merged 1 commit into
developmentfrom
feat/runDEoptim-convergence
Oct 17, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
feat/runDEoptim-convergence

Conversation

@eliotmcintire

Copy link
Copy Markdown
Contributor

Fits sometimes stop while still improving. The stopping rule becomes a fit setting that the fit's cache sees, so a stopped fit can be continued with a stricter rule.

Affects: nothing changes unless convergence is given; leaving it out keeps existing cached fits valid.

Depends-on: PredictiveEcology/clusters#55

Technical details

runDEoptim() had no way to pass the early-stop settings to clusters::DEoptimIterative() (R/DEoptim_fns.R, the Cache(clusters::DEoptimIterative(...)) call). New argument convergence = NULL is passed through; when NULL it is in omitArgs (via omitNullArgs(), as covCentre is), so existing keys are unchanged, and when set it is in the fit's key. clusters floor 0.0.80. Tests (test-runDEoptim-convergence.R): pass-through, NULL not in the key, a set value is. The two mock helpers moved from test-runDEoptim-plotEvery.R to helper-runDEoptim-mocks.R so both files share them. Full tests: 0 failures on the branch and on development. R CMD check --no-manual (vignettes not built): 0 errors; Rd and codoc clean; the only warnings are the unbuilt vignettes.

🤖 Generated with Claude Code

https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6

… and, when not NULL, the fit's cache key

clusters floor 0.0.80. Depends-on: PredictiveEcology/clusters#55

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.14%. Comparing base (b66f2ec) to head (0f040e9).
⚠️ Report is 3 commits behind head on development.

Additional details and impacted files
@@               Coverage Diff               @@
##           development     #162      +/-   ##
===============================================
- Coverage        89.18%   89.14%   -0.04%     
===============================================
  Files               50       50              
  Lines             4409     4413       +4     
===============================================
+ Hits              3932     3934       +2     
- Misses             477      479       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eliotmcintire
eliotmcintire merged commit 9e062b9 into development Oct 17, 2026
15 of 16 checks passed
@eliotmcintire
eliotmcintire deleted the feat/runDEoptim-convergence branch October 17, 2026 18:00
eliotmcintire added a commit that referenced this pull request Oct 17, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards compatible Existing code and results keep working unchanged enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant