JuliaNLSolvers / Optim.jl

Optimization functions for Julia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get rid of Manifold abstract supertype?

jecs opened this issue · comments

Hi, I was trying out the manifold functionality in Optim.jl. It's nifty. However, I noticed that in order to use it, you need to not only define the methods retract! and project_tangent! but also need to subtype the abstract Manifold type.

Is it really necessary to subtype the Manifold type if you need to define those methods anyway? Why not drop that requirement altogether, similar to the way that ProximalOperators.jl only requires you to define prox! and grad!?

That is possible, yes. Abstract types can be useful for fallbacks, but that's probably not too relevant as you say, as you have to define the manifold specific methods anyway.

It might be used for dispatch at a higher level somewhere, I'm not sure.

I think the plan is to transition to Manifolds.jl: JuliaManifolds/Manifolds.jl#35 . There is more than these two functions that can be useful for manifold optimization.

Which manifold did you have in mind? Besides Optim transitioning to support also the manifolds as Mateusz mentioned, you might also want to check https://github.com/JuliaManifolds/Manopt.jl (disclaimer – a package I develop).