-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add a numerical checks for retractions and their inverses #187
Conversation
# Conflicts: # Project.toml
… we avoid double includes.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #187 +/- ##
=======================================
Coverage 99.96% 99.96%
=======================================
Files 27 30 +3
Lines 3156 3241 +85
=======================================
+ Hits 3155 3240 +85
Misses 1 1 ☔ View full report in Codecov by Sentry. |
Instead of multiple imports we now have a small edit: Unified all definitions that are used more than once in that package now, it'ß path is added to the local path if not yet done before, then the module can be loaded just with |
The last 3 points should not be that much of work, so I would like to have first a bit of feedback on this approach (both the slight rework of the tests and the new check), since the two remaining functions are nearly copy paste of the existing check.
though I have not yet seen the order of error for vector transports in books. |
Let's keep this a bit simpler and just do one check in this PR. I have to think about the other checks in theory first. |
I just still found out a good idea to check vector transports. |
That is a good idea 👍 . |
At least trim for best slope fitting. |
Or to be precise you would do (I guessed the wrong keyword in the last post)
and you are fine. I would usually expect a method to be fine until 1e-8, so I feel this is a good standard; |
I see, maybe indeed finding nicer default limit would be too much work. I just thought it kind of not nice that it returns false for one of our retractions that is accurate enough in practice. Let's keep it as is then. |
I've added some types to make it easier to see what is supposed to be what, and fixed a few issues in docstrings. |
Sure, I think we do not necessarily need to do reviews here for typos (and type annotations). Thanks :) Also I really was a bit lazy to move that to an extension, but I think I nearly did that by now. Will also check that it loads a bit faster now |
Yes deciding on a good tradeoff there is maybe a bit hard, the -8 comes from the idea that about the sqrt of machine precision is what I would prefer to still have before too much errors kick in (also underflow ones). |
In principle the last commit does the rework to put Statistics in a weak dependency (It will be a direct on in Manifolds then and is one in Manopt already). In practice there is some strange error still that I do not understand that I might try to fix somewhen, but it took me nearly an hour already to get to this (hence my phrasing above: I am too lazy) – getting weak dependencies to work is still involving a bit too much magic for me in the first set up. |
…stand) with Printf within the Plots Extensin, so maybe this fixes it? This is all magic land.
Hm, Julia 1.6 now still fails using the (previously working) Plots extension. Hmpf. |
I now spent nearly 2 hours and the one thing I can not get (back) to work is the Plots extension on 1.6. It worked before I added the Statistics extension. Since then it randomly chooses on my machine to work and not to work. |
Since we run Aqua checks, can we remove the manual ambiguity check we have in the beginning of the Besides that we lose one line of code coverage (99.97 -> 99.94) since we have a second static line by now (for the registration of hints). |
Thanks for changing it to an extension! I've excluded that one line from coverage. |
Co-authored-by: Mateusz Baran <[email protected]>
Was a bit of work, but you were right, it is worth it spending that. |
If we had no exclusions in Aqua, those ambiguity checks would indeed be unnecessary. |
…ds/ManifoldsBase.jl into kellertuer/check_retraction
This aims to resolve JuliaManifolds/Manifolds.jl#599,
but my straight forward idea does not yet yield the right results I fear.
Since the check reuses a lot of methods that are already defined in Manopt.jl, I decided to move all of that up here to ManifoldsBase.
That way, Manopt can later import them from here, and the check is already available when just loading ManifoldsBase
Roadmap / ToDo
throw_error
to the new approach witherror=
and symbols (to warn or info instead as well)