LineSearches.jl
LineSearches.jl copied to clipboard
Step by step linesearch
Hi,
Sorry to create another issue with an easy question, but I was wondering if there is a way to display each iteration of a line search algorithm.
The basic example on show the results but I'd like to see every step of the process.
Thank you very much!
hagerzhang!
has verbosity options via the display
parameter: https://github.com/JuliaNLSolvers/LineSearches.jl/blob/master/src/hagerzhang.jl (I don't know exactly how the bitwise operations work, this was created long before my time with the package)
It doesn't seem like the other linesearches have any inbuilt support for verbose output. PRs are welcome :smile:
thank you very much once again!
(I don't know exactly how the bitwise operations work, this was created long before my time with the package)
That is a pretty weird way of specifying it. Basically if display has the same bit at the same place as either of the options, it will print. Say it was in binary instead, it would print final output if display was 000001 (as bitwise comparison between display and final will return 000001) and it would print iter if display was 000010 (1 << 1 is 2 so it is 01), and it would print parameters if display was 000100 (4). Then if you enter 6 instead (000110) it will plrint parameters and iter info, and if you enter 7 (000111) it will print final, iter, and parameter info. We should probably change this, haha.
Hehe, yes it looks like a remnant of the original FORTRAN(?) code. I tried
to enable display a year ago, but gave up as I didn't know what datatype to
use (if I remember correctly, Int
was not good enough)
On Fri, 2 Jun 2017 at 21:08 Patrick Kofod Mogensen [email protected] wrote:
(I don't know exactly how the bitwise operations work, this was created long before my time with the package)
That is a pretty weird way of specifying it. Basically if display has the same bit at the same place as either of the options, it will print. Say it was in binary instead, it would print final output if display was 000001 (as bitwise comparison between display and final will return 000001) and it would print iter if display was 000010 (1 << 1 is 2 so it is 01), and it would print parameters if display was 000100 (4). Then if you enter 6 instead (000110) it will plrint parameters and iter info, and if you enter 7 (000111) it will print final, iter, and parameter info. We should probably change this, haha.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/JuliaNLSolvers/LineSearches.jl/issues/45#issuecomment-305896781, or mute the thread https://github.com/notifications/unsubscribe-auth/AFV6DcvO6Xbi2SskXJdSMrHPD514t2zJks5sAGusgaJpZM4NXJV3 .
Hehe, yes it looks like a remnant of the original FORTRAN(?) code. I tried to enable display a year ago, but gave up as I didn't know what datatype to use (if I remember correctly,
Int
was not good enough)
a tuple?