Skip to content

Conversation

@MohamedLaghdafHABIBOULLAH
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR corrects the model function mk in the SolverCore.solve! method for both LM and R2N solvers by adding a quadratic regularization term.

  • Adds the regularization term - 1/2 * σk * dot(d, d) to the model function mk
  • Ensures consistent mathematical formulation across both solver implementations

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
src/R2N.jl Updates model function to include quadratic regularization term
src/LM_alg.jl Updates model function to include quadratic regularization term

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Sep 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.41%. Comparing base (e0f214d) to head (7b4748c).
⚠️ Report is 247 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #239       +/-   ##
===========================================
+ Coverage   61.53%   84.41%   +22.88%     
===========================================
  Files          11       13        +2     
  Lines        1292     1630      +338     
===========================================
+ Hits          795     1376      +581     
+ Misses        497      254      -243     

☔ View full report in Codecov by Sentry.
📢 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.

@MohamedLaghdafHABIBOULLAH
Copy link
Collaborator Author

Should we merge? @dpo @MaxenceGollier

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@MaxenceGollier
Copy link
Collaborator

I think dpo had a comment (on zulip)

while !done
sub_atol = stats.iter == 0 ? 1.0e-3 : min(sqrt_ξ1_νInv ^ (1.5), sqrt_ξ1_νInv * 1e-3)

solver.subpb.model.σ = σk
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dpo is this ok for you?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should we remove this ?
solver.subpb.model.σwill not be updated anywhere ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that line needs to stay. It's the computation of $\xi_k$ that is inefficient. Please grab the model value from the stats and subtract the $\tfrac{1}{2} \sigma |s|^2$ to avoid recomputing it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should close this as this issue has been treated here PR by Maxence.

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.

3 participants