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

Keep track of residuals in IterState, adapted GaussNewton accordingly #343

Merged
merged 3 commits into from
Jan 17, 2024

Conversation

gmilleramilar
Copy link
Contributor

I took a stab at updating the definition of IterState to support a fix for #342. Library builds. Tests likely don't build. I currently don't have the ability to build the tests.

Copy link
Member

@stefan-k stefan-k left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your work, I really appreciate it! Changes like these are quite a chore! I have only a few minor comments. Unfortunately the changes I am requesting are also a lot of chore :/

Feel free to get in touch if something isn't clear.

argmin/src/core/state/iterstate.rs Outdated Show resolved Hide resolved
argmin/src/core/state/iterstate.rs Outdated Show resolved Hide resolved
argmin/src/core/state/iterstate.rs Outdated Show resolved Hide resolved
argmin/src/core/state/iterstate.rs Outdated Show resolved Hide resolved
argmin/src/core/test_utils.rs Outdated Show resolved Hide resolved
argmin/src/solver/brent/brentopt.rs Outdated Show resolved Hide resolved
@@ -89,7 +89,7 @@ where
}
}

impl<P, O, F> Solver<O, IterState<P, (), (), (), F>> for ConjugateGradient<P, F>
impl<P, O, F, R> Solver<O, IterState<P, (), (), (), F, R>> for ConjugateGradient<P, F>
Copy link
Member

Choose a reason for hiding this comment

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

CG actually has residuals. Updating this to use the residual in IterState could be a good additional test bed, but it can also be skipped for this PR.

argmin/src/solver/conjugategradient/nonlinear_cg.rs Outdated Show resolved Hide resolved
@gmilleramilar
Copy link
Contributor Author

Yup, I think I get it all. I have it in progress. Unfortunately I'll be offline until mid-next-week, FYI.

@stefan-k
Copy link
Member

I currently don't have the ability to build the tests.

Are you on Windows? Tests require netlib which isn't available on Windows. A fix is described in #234 (comment) .

@stefan-k
Copy link
Member

stefan-k commented Nov 4, 2023

I tried to fix the conflicts with main in order to get the CI to run again because all the old logs were already deleted.

@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2024

Codecov Report

Attention: 32 lines in your changes are missing coverage. Please review.

Comparison is base (852f6a2) 90.25% compared to head (f7ce247) 90.23%.
Report is 1 commits behind head on main.

Files Patch % Lines
argmin/src/core/solver.rs 33.33% 4 Missing ⚠️
argmin/src/solver/brent/brentroot.rs 0.00% 4 Missing ⚠️
argmin/src/solver/quasinewton/sr1.rs 70.00% 3 Missing ⚠️
argmin/src/solver/quasinewton/sr1_trustregion.rs 70.00% 3 Missing ⚠️
argmin/src/solver/simulatedannealing/mod.rs 57.14% 3 Missing ⚠️
argmin/src/solver/trustregion/steihaug.rs 62.50% 3 Missing ⚠️
...rgmin/src/solver/trustregion/trustregion_method.rs 57.14% 3 Missing ⚠️
argmin/src/core/state/iterstate.rs 98.63% 2 Missing ⚠️
argmin/src/solver/linesearch/hagerzhang.rs 60.00% 2 Missing ⚠️
...n/src/solver/gaussnewton/gaussnewton_linesearch.rs 66.66% 1 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #343      +/-   ##
==========================================
- Coverage   90.25%   90.23%   -0.02%     
==========================================
  Files         141      141              
  Lines       19679    19778      +99     
==========================================
+ Hits        17761    17847      +86     
- Misses       1918     1931      +13     

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

@stefan-k stefan-k changed the title add new generic parameter and field/accessors to IterState for residuals Keep track of residuals in IterState, adapted GaussNewton accordingly Jan 17, 2024
@stefan-k stefan-k merged commit 2a49597 into argmin-rs:main Jan 17, 2024
16 checks passed
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.

None yet

3 participants