-
Notifications
You must be signed in to change notification settings - Fork 24
Improving printing output #1
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1 +/- ##
==========================================
+ Coverage 96.94% 97.21% +0.26%
==========================================
Files 7 7
Lines 262 287 +25
==========================================
+ Hits 254 279 +25
Misses 8 8
Continue to review full report at Codecov.
|
lostella
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some minor changes to be addressed, in my opinion, see the comments in the code (of course they apply to all the currently available algorithms).
src/algorithms/DouglasRachford.jl
Outdated
| # Constructor(s) | ||
|
|
||
| function DRSIterator(x0::BlockArray{R}; f=Zero(), g=Zero(), gamma::R=1.0, maxit::I=10000, tol::R=1e-4, verbose=1) where {I, R} | ||
| function DRSIterator(x0::BlockArray{R}; f=Zero(), g=Zero(), gamma::R=1.0, maxit::I=10000, tol::R=1e-4, verbose=2) where {I, R} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why verbose=2 by default? I would say 1, that is the minimum (nonzero) verbosity.
src/algorithms/DouglasRachford.jl
Outdated
|
|
||
| verbose(sol::DRSIterator, it) = sol.verbose > 0 | ||
| verbose(sol::DRSIterator) = sol.verbose > 0 | ||
| verbose(sol::DRSIterator, it) = sol.verbose > 0 && (sol.verbose == 1 ? true : (it == 1 || it%100 == 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to the above comment: should be sol.verbose == 2 ? true. Furthermore, I would make that 100 an option (output_freq maybe? Of course defaulting to 100).
|
I've made the changes. Also I introduce the |
src/algorithms/DouglasRachford.jl
Outdated
| x::T | ||
| f | ||
| g | ||
| cost::R |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forget about the cost for now, this we will add later. Let's not modify anything in the initialize and iterate methods in this PR, only visualization stuff.
Small modifications to printing output based on old solvers.
I think it would be nice to have also the cost function value! but I guess this requires adding a new field
ProximalAlgorithm?