Comments (5)
Hi @stefan-k,
I'm interested in this particular issue and would like to help fix it (if it is still relevant). Could you give me some pointers on where to get started? I'm also interested in contributing in general, so please feel to direct to me more urgent or important issues. :)
from argmin.
Hi @whereistejas ,
thanks for your interest to contribute! It's been a while since I opened this issue, so I can't remember the details anymore. The implementation follows this paper [1]. The code can be found in [2]. I think a good way to move forward is to reproduce the errors by running the steepestdescent
and nonlinear_cg
examples with the HagerZhangLineSearch
. I suspect a wrong <
, >
, <=
or >=
.
While going through the implementation, I noticed a comment that not all stopping criteria are implemented, but I don't think that this is causing the problem.
If you have any questions feel free to get in touch via the issues or via gitter. I'm happy to help, but I may unfortunately be a bit slow to respond currently!
[1] William W. Hager and Hongchao Zhang. "A new conjugate gradient method with guaranteed descent and an efficient line search." SIAM J. Optim. 16(1), 2006, 170-192.
[2] https://github.com/argmin-rs/argmin/blob/master/src/solver/linesearch/hagerzhang.rs
from argmin.
Hi @stefan-k ,
I compared the output of the two line search methods in steepestdescent
.
The output for Hager-Zhang method is:
[
1.1999999999997424,
1.2000000000001065
]
Where as the output for More-Thuente method is:
[
1.0724442427550391,
1.151531565672518
]
So, I'm guessing, this is the discrepancy you are talking about?
I also cross checked the algorithm:
argmin/src/solver/linesearch/hagerzhang.rs
Lines 252 to 304 in dc2a06c
With the algorithm in the paper, I couldn't find any mistakes.
from argmin.
Thanks for comparing the code with the paper! Yes, this is the discrepancy I was talking about. As you can see, it barely moves away from the initial position.
I have to admit, I'm a bit lost as to how to proceed. When looking at the implementation in Julia you can see from the comments at the top of the file that the original code (by the author of the paper) "has undergone numerous revisions since publication of the paper". Therefore, this may be a weird edge case which was fixed after publication of the paper (just a guess).
Do you want to have a look at this? It might be pretty tedious to go through the original code and figure out what was changed and what might be going wrong in our implementation. This problem definitely needs fixing, but I can totally understand if you want to tackle a problem which is more interesting and satisfying as your first contribution. If you want to set this issue aside for now and work on something else then I suggest you get in touch in the Gitter channel and we can find something interesting for you.
from argmin.
Hi @stefan-k,
I'm fine with working on this issue.
On further comparison, I did find some differences:
argmin/src/solver/linesearch/hagerzhang.rs
Lines 327 to 338 in dc2a06c
The if conditions here are different from what is mentioned in the paper:
This is my current lead.
from argmin.
Related Issues (20)
- Create inplace variants of math traits
- ParticleSwarm is not reproducible HOT 3
- More-Thuente Linesearch Algorithm Bug: "Search direction must be a descent direction" HOT 7
- BrentRoot is missing tests
- Add `faer-rs` as math backend
- Add stopping criteria based on the number of function evaluations
- Add LaTeX support to docs
- Add derivatives and Hessians to test functions in argmin_testfunctions
- Add more test functions to `argmin_testfunctions`
- Create visualization of all test functions in `argmin_testfunctions`
- `owl-qn` example does not converge HOT 4
- Observers and checkpointing are missing tests
- Enable observers to create final report
- Thoughts on future state handling
- Various non productive overhead HOT 1
- Example (lbfgs) cannot be compiled after upgrade to version 0.10 HOT 2
- rss/atom feed of the blog HOT 1
- newton and newton cg freeze rather than stopping HOT 1
- Difference between bfgs.rs and bfgs of optimtool.unconstrain.newton_quasi HOT 2
- Add Differential Evolution Algorithm HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argmin.