-
Notifications
You must be signed in to change notification settings - Fork 21
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
"logarthmic" to "logarithmic", improve readability, test 2D patterns and optimal IB #25
Conversation
chriscoey
commented
Jul 9, 2018
•
edited
Loading
edited
- change "logarthmic" to "logarithmic"
- slightly improve readability/consistency, especially of tests
- test 2D patterns
- test optimal IB scheme (tragically slow)
Codecov Report
@@ Coverage Diff @@
## master #25 +/- ##
===========================================
+ Coverage 55.79% 77.63% +21.84%
===========================================
Files 2 2
Lines 708 702 -6
===========================================
+ Hits 395 545 +150
+ Misses 313 157 -156
Continue to review full report at Codecov.
|
@joehuchette optimal IB scheme is extremely slow to calculate (even for 4 breakpoints).. is it ever worthwhile? also, where do the values for |
if optimal IB scheme test takes too long on travis, I will remove it. quite absurd how slow it is. edit: reduced it to 3x3 breakpoints - works ok |
I'm satisfied at this point |
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.
Looks fine to me, but the diff for the triangulation formulations is hard to read. Did you change that code?
src/jump.jl
Outdated
sum(λ[tx,ty] for tx in 1:nˣ, ty in 1:nʸ if mod(tx,2) != mod(ty,2) && (tx+ty) in 3:4:(nˣ+nʸ)) ≤ w[2] | ||
sum(λ[tx,ty] for tx in 1:nˣ, ty in 1:nʸ if mod(tx,2) != mod(ty,2) && (tx+ty) in 5:4:(nˣ+nʸ)) ≤ 1 - w[2] | ||
end) | ||
# elseif pattern == :OptimalTriangleSelection |
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 is this commented out?
I commented out 3 parts of code in src/jump.jl:
because they all appeared to me to be not useable/accessible. imo it's better (and less confusing) to have untestable dead code commented out. the two patterns above are not recognized in BivariatePWLFunction so it fails without an error message on https://github.com/joehuchette/PiecewiseLinearOpt.jl/blob/184ea708cd3d3869a95cd62b9dcb1923d03a1a77/src/types.jl#L101 |
I only made a few small aesthetic changes, mostly to comments, in the triangulation formulations |
They're accessible if you change the |
OK so it sounds like a simple fix to allow the two extra patterns, right? a few extra lines in BivariatePWLFunction. we can do it here and then cover the two patterns with unit tests. which pattern did you need to specify before you could later change the pattern to stencil? and same question for triangle selection. |
Yes, it should be a simple change to support them "officially". I would generate the triangulation randomly, then change the |
OK I uncommented. can you open an issue for the expected interface change |
Thanks! #28 is for the interface change, take a look and let me know your thoughts. |