The optimizers of OptimizationManopt: Riemannian optimization with the
Manopt.jl algorithms, ported to R, on the manifold given as the
manifold of the OptimizationProblem() (Euclidean(), Sphere(),
SymmetricPositiveDefinite(), whose points are matrices, or
Lorentz()). Gradient based methods turn the Euclidean gradient of the
problem (finite differences when it has none) into the Riemannian one by
projecting it onto the tangent space and changing it to the representer
of the metric (\(p sym(G) p\) on the positive definite matrices, the
sign of the last coordinate flipped on the Lorentz model); the trust region and cubic
regularization methods use the Riemannian Hessian built the same way
from Hessian vector products.
Usage
AbstractManoptOptimizer()
GradientDescentOptimizer()
ConjugateGradientDescentOptimizer()
QuasiNewtonOptimizer()
NelderMeadOptimizer()
ParticleSwarmOptimizer()
CMAESOptimizer()
ConvexBundleOptimizer()
FrankWolfeOptimizer()
TrustRegionsOptimizer()
AdaptiveRegularizationCubicOptimizer()Details
GradientDescentOptimizer(): gradient descent with an Armijo line search (Manopt.gradient_descent).ConjugateGradientDescentOptimizer(): nonlinear conjugate gradients with the conjugate descent coefficient and restarts on non descent directions.QuasiNewtonOptimizer(): limited memory Riemannian BFGS with a Wolfe Powell line search.NelderMeadOptimizer(): the Riemannian Nelder Mead simplex method; as upstream, the simplex is random and the starting point is not used.ParticleSwarmOptimizer(): particle swarm optimization withpopulation_sizeparticles (100), one of them the starting point.CMAESOptimizer(): the Riemannian covariance matrix adaptation evolution strategy.ConvexBundleOptimizer(): the convex bundle method for (sub)gradient problems.FrankWolfeOptimizer(): the Frank Wolfe method with a gradient descent oracle.TrustRegionsOptimizer(): Riemannian trust regions with a truncated conjugate gradient subsolver.AdaptiveRegularizationCubicOptimizer(): adaptive regularization with cubics and a Lanczos subsolver.
The common solve arguments map as in Optimization.jl: maxiters to
StopAfterIteration, maxtime (seconds) to StopAfter, abstol to
StopWhenGradientNormLess for gradient based methods and to
StopWhenChangeLess otherwise; a stopping_criterion from Manopt is
added to them. When maxiters or maxtime is given without abstol or
a stopping_criterion, a convergence criterion is added (gradient norm
below 1e-8 for gradient descent and conjugate gradients, 1e-6 for quasi
Newton and trust regions, 1e-9 for cubic regularization, gradient norm
or change below 1e-8 for Frank Wolfe). Without any of them the solver
runs with its Manopt defaults. Other solve arguments reach the solver:
stepsize, retraction_method, vector_transport_method,
population_size, sigma and so on. Constraints and bounds are not
supported.
Examples
rosenbrock <- function(x, p) (p[1] - x[1])^2 + p[2] * (x[2] - x[1]^2)^2
prob <- OptimizationProblem(rosenbrock, c(0, 0), c(1, 100), manifold = Euclidean(2))
sol <- solve(prob, QuasiNewtonOptimizer())
round(sol$u, 4)
#> [1] 1 1
# the smallest eigenvector of a symmetric matrix on the sphere
A <- diag(c(3, 1, 2))
rq <- function(x, p) sum(x * (A %*% x))
sph <- OptimizationProblem(rq, c(1, 1, 1) / sqrt(3), manifold = Sphere(2))
round(abs(solve(sph, TrustRegionsOptimizer())$u), 6)
#> [1] 0 1 0