Euclidean(n) is the space \(R^n\) and Sphere(n) the unit sphere
\(S^n\) embedded in \(R^{n+1}\), the manifolds of Manifolds.jl that
the Manopt optimizers (GradientDescentOptimizer() and the others)
work on. Pass one as the manifold of an OptimizationProblem(); on the
sphere the starting point must have norm one. The sphere carries the
geometry of Manifolds.jl: the exponential map followed by a projection
back onto the sphere as its retraction, the parallel transport, the
logarithmic map and the projection onto tangent spaces, through which a
Euclidean gradient becomes a Riemannian one.
Details
SymmetricPositiveDefinite(n) is the manifold of symmetric positive
definite \(n \times n\) matrices with the affine invariant metric
\(g_p(X, Y) = tr(p^{-1} X p^{-1} Y)\): its points are matrices (the
starting point and the solution of an OptimizationProblem()), its
retraction the exponential map \(p^{1/2} Exp(p^{-1/2} X p^{-1/2})
p^{1/2}\), with the logarithmic map, the parallel transport, the
projection onto the symmetric matrices and the Riemannian gradient
\(p sym(G) p\) of a Euclidean gradient \(G\). Lorentz(n) is
\(R^n\) with the Minkowski metric (timelike in the last coordinate), as
in Manifolds.jl: its exponential map, transport and retraction are those
of \(R^n\). As in Manifolds.jl a Euclidean gradient cannot be converted
to the Minkowski metric (a MethodError), so a gradient based solve of an
OptimizationProblem() on it fails; the Manopt solvers run with a
Riemannian gradient given in the Minkowski representation. Both are also
the manifolds of the geodesic convexity analysis, analyze(ex, M)
(analyze()).
Examples
M <- Sphere(2)
M
#> Sphere(2)
f <- function(x, p) x[1] + 2 * x[2] + 3 * x[3]
prob <- OptimizationProblem(f, c(1, 0, 0), manifold = M)
sol <- solve(prob, GradientDescentOptimizer(), maxiters = 100)
round(sol$u, 4)
#> [1] -0.2673 -0.5345 -0.8018