-
Notifications
You must be signed in to change notification settings - Fork 56
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
Multinomial randomness #702
Conversation
reintroduce them from 2020.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #702 +/- ##
==========================================
- Coverage 99.57% 99.57% -0.01%
==========================================
Files 112 113 +1
Lines 10876 10961 +85
==========================================
+ Hits 10830 10914 +84
- Misses 46 47 +1 ☔ View full report in Codecov by Sentry. |
All things I wanted to implement (and that needed fixing) are implemented (and fixed, e.g. the multinomalsymmetric ones have more than just the symmetric check for points now – again). So this is no draft any longer, but still needs the tests to be checked and extended. |
Co-authored-by: Mateusz Baran <[email protected]>
# Conflicts: # NEWS.md
Multinomial is failing on 1.6, but it seems to not be so easy to reproduce, on my machine that works fine. |
This is weird. |
Might also be that, but even more strange is, that there should not happen any error and on Julia 1.10, 1.9 and 1.6 on my machine it also does not happen. |
Probably tolerance is too low. It would be more clear if that |
Yes sure, that would help, but I do not yet directly see, why that is happening yet (also because I can not yet reproduce it here). |
The problem seems to be that this line either there or in the decorator at implicitly assumes that the error at hand is a DomainError (or one of the other simple errors that has edit: Ah I see if error is edit: Ah we could change both lines and any other line with such access to use |
Great! We have one false-positive, and now just need to write tests for the checks (one SPD matrix that is not multinomial, one actual point on M); similarly for the tangent space. Maybe we could also improve the errors that are returned, since for now they would only display the wrong Manifold (i.e. that the point is not on the SPD manifold), which might be misleading. |
For multinomial SPD I now wrote the tests – and had an idea for random tangents as well, we basically need tangent vectors to multinomial (rows & columns sum to zero) that are symmetric, so we could just pass that to Multinomial and symmetrize afterwards. edit: ah no, that does not work. Then I do not have a good idea how to generate tangents on multinomalspd |
Then I would also consider this to be ready for review and merge. |
The one line we do not hit is a false-negative (sadly). |
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.
Just a few minor comments.
Co-authored-by: Mateusz Baran <[email protected]>
# Conflicts: # NEWS.md # src/manifolds/Multinomial.jl # src/manifolds/MultinomialDoublyStochastic.jl # src/manifolds/MultinomialSymmetric.jl
This one is now merged with #700, so we just have to wait for the tests. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR introduces random for
MultinomialSymmetric
andMultinomialDoublyStochatstic
, which I saw was missing due to a comment here.Checking the corresponding paper https://ieeexplore.ieee.org/document/8861409
I saw they also introduce MultinoialSPD, which I added here as well. So this short side-track still needs
ToDo
riemannian_gradient
forMultinomial
and the three doubly stochastic onesriemannian_Hessian
forMultinomialSymmetric
The paper (its tech report we link in the docs to be precise) does state the Hessian for
MultinomialDoublyStochastic
, but it is quite involved (the symmetric one already is), that I am not sure I can “hack that down” in an efficient and stable way.