Skip to content

Allow CoordinateDescent 0.5 - #4

Merged
mlakolar merged 1 commit into
masterfrom
coordinatedescent-0.5
Oct 22, 2026
Merged

mlakolar merged 1 commit into
masterfrom
coordinatedescent-0.5

Conversation

@mlakolar

Copy link
Copy Markdown
Owner

Summary

Widens the CoordinateDescent compat to "0.4, 0.5" (version 0.2.1) and adapts the package to the two breaking changes of CoordinateDescent 0.5 that affect it.

  • Options in the second stages. Each estimator ran a second stage with options rebuilt field by field (CDOptions(; maxIter=options.maxIter, …, warmStart=true)). That drops relativeTol, the field CoordinateDescent 0.5 adds, so a caller's relativeTol = false would be ignored. _warmStart(options) copies every field and sets warmStart, and works with both versions.
  • Relative stopping rule. CoordinateDescent 0.5 stops relative to coordinateScale and responseScale of the loss, and losses that do not define them keep the absolute rule. CDInverseKroneckerLoss and CDInverseReducedSymKroneckerLoss now define them as CDQuadraticLoss does: the square root of the curvature along each coordinate, and the largest |bₖ| / √aₖ. The definitions are guarded by isdefined(CoordinateDescent, :coordinateScale), so the package still loads with 0.4. This matches CovSel's change for CDDirectDifferenceLoss (Allow CoordinateDescent 0.5 CovarianceSelection.jl#8).

No API changes.

Tests

  • _warmStart keeps every field, including relativeTol
  • with CoordinateDescent 0.5: the scales of both losses equal those of CDQuadraticLoss with the same Hessian and linear term, and multiplying Σx and Σy by a power of 2 divides the solution by its square and takes the same number of passes
  • all tests pass locally on Julia 1.10 and 1.13 with CoordinateDescent 0.5.1 + ProximalBase 0.4.0 (20184 tests) and with CoordinateDescent 0.4.1 + ProximalBase 0.3.2 (20164), against CovSel master with its compat widened as in README: the five packages in one table, near the top #8

Merge order

CI takes CovSel from its GitHub master, which still requires CoordinateDescent 0.4 until mlakolar/CovarianceSelection.jl#8 is merged, so CI here tests 0.4 only. Merging this first is safe; rerun CI after CovSel#8 is merged to test 0.5.

🤖 Generated with Claude Code

- Compat CoordinateDescent "0.4, 0.5"; version 0.2.1
- The second stages copied the options field by field into a new
  CDOptions, which would drop relativeTol, the field CoordinateDescent
  0.5 adds; _warmStart copies every field and sets warmStart
- CDInverseKroneckerLoss and CDInverseReducedSymKroneckerLoss define
  coordinateScale and responseScale (when CoordinateDescent has them),
  as for its quadratic loss, so the relative stopping rule of
  CoordinateDescent 0.5 does not depend on the units of Σx and Σy; the
  curvature is shared with descendCoordinate!
- Tests for the copied options, the scales against those of
  CDQuadraticLoss with the same Hessian, and the invariance of the
  solution and the number of passes to the scale of Σx and Σy

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.64%. Comparing base (d88f552) to head (0cc0f48).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master       #4   +/-   ##
=======================================
  Coverage   98.64%   98.64%           
=======================================
  Files          12       12           
  Lines        1403     1407    +4     
=======================================
+ Hits         1384     1388    +4     
  Misses         19       19           

☔ 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.

@mlakolar
mlakolar merged commit 3d8263b into master Oct 22, 2026
4 of 6 checks passed
@mlakolar
mlakolar deleted the coordinatedescent-0.5 branch October 22, 2026 15:51
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

Successfully merging this pull request may close these issues.

1 participant