-
Notifications
You must be signed in to change notification settings - Fork 50
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
comparison tolerance in reluplex [and other algorithms] #90
Comments
I'm okay with this. These numerical issues are pretty tricky. |
I wonder if Julia's ≈ (equivalent to Base.isapprox with default arguments) operator could be helpful? It does some sort of approximate equality using tolerances - I don't know if there's an equivalent built in function for comparisons. Although it may go in the wrong direction for this (since it would make it more liberally consider things as broken instead of being stricter). |
Since this library uses LazySets, I would suggest that you control tolerance with
See |
Thanks for the tip on this @mforets ! I like the idea of being able to set a global tolerance (per solver maybe) and keep comparisons with literal zeros in the code. |
@castrong brought this issue up, which may be impacting his results.
See e.g., the following two lines in reluplex, and in particular the comparisons with 0
Due to the precision of the underlying solvers, sometimes numbers on the order of 1e-10 can be returned, and should probably be considered zeros. We can address this is by introducing a tolerance:
This is just one example; other optimization solvers also perform similar comparisons. Note that the
-TOL
is maybe not desirable; it may by more principled to just sayz<TOL
, not sure.Does this sound like the right fix for this @changliuliu @mykelk, or do we inadvertantly invalidate completeness if we do this? Is there a principled way of picking the tolerance? We can set it to be user-defined in the Reluplex type, but we'd still have to come up with a default.
The text was updated successfully, but these errors were encountered: