Plans for solvers

For any optimisation performed in Manopt.jl information is required about both the optimisation task or “problem” at hand as well as the solver and all its parameters. This together is called a plan in Manopt.jl and it consists of two data structures:

  • The Manopt Problem describes all static data of a task, most prominently the manifold and the objective.
  • The Solver State describes all varying data and parameters for the solver that is used. This also means that each solver has its own data structure for the state.

By splitting these two parts, one problem can be define an then be solved using different solvers.

Still there might be the need to set certain parameters within any of these structures. For that there is

Manopt.set_manopt_parameter!Function
set_manopt_parameter!(f, element::Symbol , args...)

For any f and a Symbole, dispatch on its value so by default, to set some args... in f or one of uts sub elements.

source
set_manopt_parameter!(element::Symbol, value::Union{String,Bool,<:Number})

Set global Manopt parameters addressed by a symbol element. W This first dispatches on the value of element.

The parameters are stored to the global settings using Preferences.jl.

Passing a value of "" deletes the corresponding entry from the preferences. Whenever the LocalPreferences.toml is modified, this is also issued as an @info.

source
set_manopt_parameter!(amo::AbstractManifoldObjective, element::Symbol, args...)

Set a certain args... from the AbstractManifoldObjectiveamo to value. This function should dispatch onVal(element)`.

Currently supported

source
set_manopt_parameter!(ams::AbstractManoptProblem, element::Symbol, field::Symbol , value)

Set a certain field/element from the AbstractManoptProblemams to value. This function should dispatch onVal(element)`.

By default this passes on to the inner objective, see set_manopt_parameter!

source
set_manopt_parameter!(ams::DebugSolverState, ::Val{:Debug}, args...)

Set certain values specified by args... into the elements of the debugDictionary

source
set_manopt_parameter!(ams::AbstractManoptSolverState, element::Symbol, args...)

Set a certain field or semantic element from the AbstractManoptSolverStateams to value. This function passes to Val(element) and specific setters should dispatch on Val{element}.

By default, this function just does nothing.

source
set_manopt_parameter!(ams::DebugSolverState, ::Val{:SubProblem}, args...)

Set certain values specified by args... to the sub problem.

source
set_manopt_parameter!(ams::DebugSolverState, ::Val{:SubState}, args...)

Set certain values specified by args... to the sub state.

source
Manopt.get_manopt_parameterFunction
get_manopt_parameter(f, element::Symbol, args...)

Access arbitrary parameters from f addressed by a symbol element.

For any f and a Symbole dispatch on its value by default, to get some element from f potentially further qualified by args....

This functions returns nothing if f does not have the property element

source
get_manopt_parameter(element::Symbol; default=nothing)

Access global Manopt parameters addressed by a symbol element. This first dispatches on the value of element.

If the value is not set, default is returned.

The parameters are queried from the global settings using Preferences.jl, so they are persistent within your activated Environment.

Currently used settings

:Mode the mode can be set to "Tutorial" to get several hints especially in scenarios, where the optimisation on manifolds is different from the usual “experience” in (classical, Euclidean) optimization. Any other value has the same effect as not setting it.

source
Manopt.status_summaryFunction
status_summary(e)

Return a string reporting about the current status of e, where e is a type from Manopt.

This method is similar to show but just returns a string. It might also be more verbose in explaining, or hide internal information.

source

Where the following Symbols are used

The following symbols are used. The column “generic” refers to a short hand that might be used for readability if clear from context.

| Symbol | Used in | Description | generic | | :–––––- | :–––: | ;–––––––––––––––––––––––––––– | :––– | | :active | DebugWhenActive | activity of the debug action stored within | | | :Basepoint | TangentSpace | the point the tangent space is at | often :p | | :Cost | generic |the cost function (within an objective, as pass down) | | | :Debug | DebugSolverState | the stored debugDictionary | | | :Gradient | generic | the gradient function (within an objective, as pass down) | | | :Iterate | generic | the (current) iterate, similar to set_iterate!, within a state | | | :Manifold | generic |the manifold (within a problem, as pass down) | | | :Objective | generic | the objective (within a problem, as pass down) | | | :SubProblem | generic | the sub problem (within a state, as pass down) | | | :SubState | generic | the sub state (within a state, as pass down) | | | ProximalDCCost, ProximalDCGrad | set the proximal parameter within the proximal sub objective elements | | | :Population | ParticleSwarmState | a certain population of points, for example particle_swarms swarm | | | :TrustRegionRadius | TrustRegionsState | the trust region radius | | | , :uExactPenaltyCost, ExactPenaltyGrad | Parameters within the exact penalty objective | | | , , | AugmentedLagrangianCost and AugmentedLagrangianGrad | Parameters of the Lagrangian function | |

Since the iterate is often stored in the states fields s.p one could access the iterate often also with :p and similarly the gradient with :X. This is discouraged for both readability as well as to star more generic, and it is recommended to use :Iterate and :Gradient instead in generic settings.

You can further activate a “Tutorial” mode by set_manopt_parameter!(:Mode, "Tutorial"). Internally, the following convenience function is available.

Manopt.is_tutorial_modeFunction
is_tutorial_mode()

A small internal helper to indicate whether tutorial mode is active.

You can set the mode by calling set_manopt_parameter!(:Mode, "Tutorial") or deactivate it by set_manopt_parameter!(:Mode, "").

source