-
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
Ellipsoid manifold #658
Comments
AFAIK it's not implemented yet. Probably people just reparameterize the objective as |
I would also probably use the reparametrization |
If I was minimizing f(y) where y in A * S where S is the sphere then I could just min f(A * x) where x in S. |
Why do you need the infectivity radius? We only use that as a default in a few places, if you do not provide (e.g. the constant in Constant Step size and gradient descent is usually not the best of ideas, since there is no convergence guarantee. We still use that as a default, but only since Armijo requires more things available. If you do not set the (constant) stepwise, in ordre to get a good guess it uses the infectivity radius (we can not just roll a dice here). And if instead of exp we use a retraction, the convergence is (though only a bit) less likely. |
Yes, it's in the Armijo line search. By the way, while doing this I thought it would be nice to add a Manopt tutorial showing the minimal interface needed in order to optimize on it. I basically did a trial and error following the MethodError's |
to get started, there is this tutorial https://manoptjl.org/stable/tutorials/Optimize!/ For the error in Armijo – I checked and actually we do not need it for the initial step but for the safeguard ( So let me know which method errors you run in and what tutorial you would have wished for. I am happy to add that. |
@kellertuer there is currently no tutorial on implementing new manifolds for particular solvers, and basically the only way to figure out if manifold X can be used with solver Y is "does it throw errors when you try?" |
Hm, but I am unsure what to do about this. It would mean we come up with some place somewhere (no clue where) that says: “If you want to use solver Y on your now manifold, you at least need the following functions?” And for 95% this is retraction, inverse retraction, norm. So one could write that for every “ingredient” of a solver, but I am not sure where to put such a thing. |
Maybe let's put it in documentation page of each solver? |
We could do a “Technical Details” section for each solver basically, but that would not help with Armijo linesearch, which seems to have been the reason here. |
What is missing is a tutorial doing
|
As I wrote above, that is very solver-dependent. And what you are missing is either an upper bound on the maximal step size (for example anything beyond π does not make much sense as a step size on the sphere) or the injectivitiy radius. But this is independent of gradient descent – any solver with a step computation would require that as soon as you want to use Armijo there. That is why I am not yet so sure what to write in such a tutorial, since it is really super dependent on the solver and its single ingredients (beyond the tutorial https://manoptjl.org/stable/tutorials/Optimize!/ to get started with optimization in general and https://juliamanifolds.github.io/ManifoldsBase.jl/stable/tutorials/implement-a-manifold/ on how to get started with manifolds in general).
Again https://juliamanifolds.github.io/ManifoldsBase.jl/stable/tutorials/implement-a-manifold/ is how to get started with implementing a manifold. “A simple interface to make it work” does not exist for solvers
so independent of which tutorial I would write, you could always find a next solcver for which the tutorial would not be enough 😕 |
I think Manopt would make more sense since it's at the intersection between ManifoldsBase and Manopt. I think a tutorial showing it for one solver is fine. Once the user has something working for one solver, it's easier to try to get it working for another solver. But getting it to work for the first solver could be discouraging for the user since he does not know how far he is and whether is at 10% of the MethodErrors or at 90% ^^ |
I will think about it, since I already linked the ManifoldsBase tutorial, it would maybe be even a good idea to start with the same manifold idea from there (Sphere with a radius) and extend that example to explain which things are needed. Might take a bit until I find time to write this – we are in the middle of a semester here in Norway, so I am busy with teaching as well – but I will think about that then and try to find a reasonable way of presentation. |
I gave the tutorial idea a few thoughts yesterday evening, and my main problem is – I think – that it will be really just for one solver then, because most solvers have a few additional functions they would need from the API |
What about adding a function to Manopt that takes solver as argument and lists what needs to be implemented? Something like
|
It could potentially have more details but this would be the general idea. |
That sounds reasonable, but maybe it is more accessible when doing a section “Technical Details” at the end of every solver documentation page? |
That was my idea from two weeks ago that you didn't particularly like: #658 (comment) 😄 |
Yes, but your new comment would also not help with Armijo ;) |
A method like that could also call a similar method for the default line search and concatenate the strings. And point out that there are different line searches with different requirements. Anyway, I think this isn't something that can be centralized and a tutorial should just point to places where one needs to look for solver-specific information. |
Sure there would be a general remark like “This solver uses a line search – check page X for further details”. That would be fine with me. The main decision is whether to write that as a function (and what should that function return?) or sections in the docs. |
I think docs would be easier to prepare than a function. A function could automatically aggregate information but that may not be necessary when a tutorial would explain how to do it. |
Both would require about the same amount of manual collection of information I think and then the documentation section is the one more accessible to users. I think I will go for the docs section then – when I find time :) |
I did the “Technical Details” section on every solver and a tutorial to implement a manifold (going along what a solver needs) – so I will close this for now, if you feel we should work on an ellipsoid manifold or we can help there in any way, feel free to reopen this :) Of course new manifolds are always welcome as a PR. |
Suppose I want to optimize over the set
{x | x' * A' * A * x = 1}
, e.g., the boundary of an ellipsoid. Is this manifold implemented somewhere ?The text was updated successfully, but these errors were encountered: