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

extra stopping condition #68

Merged
merged 1 commit into from
Jan 11, 2024
Merged

extra stopping condition #68

merged 1 commit into from
Jan 11, 2024

Conversation

Huangzizhou
Copy link
Contributor

Extra stopping condition based on grad.dot(delta_x). A better way of adding this is to get rid of the dependency on cppopt lib but I'm trying to make minimal changes before the deadline.

Reason why this is a reasonable stopping condition:
Suppose we solve a quadratic minimization $J = \frac{1}{2}x^TAx - bx$, the minimizer is $\hat{x}=A^{-1}b$. If the newton method is used, then $\Delta x = A^{-1}(Ax-b) = x - \hat{x}$, and $\nabla J \cdot \Delta x = (Ax-b)^T(x-\hat{x})=(x-\hat{x})^TA(x-\hat{x})$, i.e. the error under $A$-norm.

@Huangzizhou Huangzizhou requested review from teseoch and zfergus January 7, 2024 15:53
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

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

Comparison is base (73d9800) 89.03% compared to head (cce9a19) 89.00%.

Files Patch % Lines
src/polysolve/nonlinear/Solver.cpp 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
- Coverage   89.03%   89.00%   -0.03%     
==========================================
  Files          51       51              
  Lines        1997     2001       +4     
==========================================
+ Hits         1778     1781       +3     
- Misses        219      220       +1     
Flag Coverage Δ
polysolve 89.00% <71.42%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@Huangzizhou Huangzizhou merged commit 9ca0ffc into main Jan 11, 2024
7 of 9 checks passed
@Huangzizhou Huangzizhou deleted the extra-stop branch January 11, 2024 20:00
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.

2 participants