Stepsizes
The following step size methods are available following the stepsize interface. They all include a default factory.
Manopt.DistanceOverGradientsStepsize — Type
DistanceOverGradientsStepsize{R<:Real,P} <: StepsizeA functor (problem, state, k, ...) -> s providing the Riemannian Distance over Gradients (RDoG) step size.
This step size is learning-rate-free: it adapts using the maximum distance travelled from the start point together with the accumulated squared gradient norms. See DistanceOverGradients for the mathematical details.
Fields
initial_distance::R: initial distance estimate $ϵ>0$max_distance::R: tracked maximum distance $\bar r_t$gradient_sum::R: accumulated sum $G_t$initial_point: stored start point $p_0$use_curvature::Bool: toggle curvature correction $ζ_κ$sectional_curvature_bound::R: lower bound $κ$ used in $ζ_κ$ whenuse_curvature=truelast_stepsize::R: last computed stepsize
Constructor
DistanceOverGradientsStepsize(M::AbstractManifold, p; kwargs...)where p is the initial point, from which the distance is tracked.
Keyword arguments
initial_distance=1e-3: initial estimate $ϵ$use_curvature=false: whether to use $ζ_κ$sectional_curvature_bound=0.0: lower curvature bound $κ$ (if known)
References
[DSN24]: Learning-Rate-Free Stochastic Optimization over Riemannian Manifolds (RDoG).
Manopt.AdaptiveWNGradient — Method
AdaptiveWNGradient(; kwargs...)
AdaptiveWNGradient(M::AbstractManifold; kwargs...)A stepsize based on the adaptive gradient method introduced by [GS23].
Given a positive threshold $\hat{c} ∈ ℕ$, an minimal bound $b_{\text{min}} > 0$, an initial $b_0 ≥ b_{\text{min}}$, and a gradient reduction factor threshold $α ∈ [0,1)$.
Set $c_0=0$ and use $ω_0 = \lVert \operatorname{grad} f(p_0) \rVert_{p_0}$.
For the first iterate use the initial step size $s_0 = \frac{1}{b_0}$.
Then, given the last gradient $X_{k-1} = \operatorname{grad} f(x_{k-1})$, and a previous $ω_{k-1}$, the values $(b_k, ω_k, c_k)$ are computed using $X_k = \operatorname{grad} f(p_k)$ and the following cases
If $\lVert X_k \rVert_{p_k} ≤ αω_{k-1}$, then let $\hat{b}_{k-1} ∈ [b_{\text{min}},b_{k-1}]$ and set
\[(b_k, ω_k, c_k) = \begin{cases} \bigl(\hat{b}_{k-1}, \lVert X_k \rVert_{p_k}, 0 \bigr) & \text{ if } c_{k-1}+1 = \hat{c}\\\\ \bigl( b_{k-1} + \frac{\lVert X_k \rVert_{p_k}^2}{b_{k-1}}, ω_{k-1}, c_{k-1}+1 \Bigr) & \text{ if } c_{k-1}+1<\hat{c}\end{cases}\]
If $\lVert X_k \rVert_{p_k} > αω_{k-1}$, the set
\[(b_k, ω_k, c_k) = \Bigl( b_{k-1} + \frac{\lVert X_k \rVert_{p_k}^2}{b_{k-1}}, ω_{k-1}, 0 \Bigr)\]
and return the step size $s_k = \frac{1}{b_k}$.
Note that for $α=0$ this is the Riemannian variant of WNGRad.
Keyword arguments
adaptive=true: switches thegradient_reductionα(iftrue) to0`.alternate_bound = (bk, hat_c) -> min(gradient_bound == 0 ? 1.0 : gradient_bound, max(minimal_bound, bk / (3 * hat_c)): how to determine $\hat{k}_k$ as a function of(bmin, bk, hat_c) -> hat_bkcount_threshold=4: anIntegerfor $\hat{c}$gradient_reduction::R=adaptive ? 0.9 : 0.0: the gradient reduction factor threshold $α ∈ [0,1)$gradient_bound=norm(M, p, X): the bound $b_k$.minimal_bound=1e-4: the value $b_{\text{min}}$p::P =rand(M): a point on the manifold $\mathcal{M}$ only used to define thegradient_boundX::T =zero_vector(M, p): a tangent vector at the point $p$ on the manifold $\mathcal{M}$ only used to define thegradient_bound
Manopt.ArmijoLinesearch — Method
ArmijoLinesearch(; kwargs...)
ArmijoLinesearch(M::AbstractManifold; kwargs...)Specify a step size that performs an Armijo line search. It is given a function $f:\mathcal{M}→ℝ$ and its Riemannian gradient $\operatorname{grad}f: \mathcal{M}→T\mathcal{M}$, the current point $p∈\mathcal{M}$ and a search direction $X∈T_{p}\mathcal{M}$.
Then the step size $s$ is found by reducing the initial step size $s$ until
\[f(\operatorname{retr}_p(sX)) ≤ f(p) - τs ⟨ X, \operatorname{grad}f(p) ⟩_p\]
is fulfilled, for a sufficient decrease value $τ ∈ (0,1)$.
To be a bit more optimistic, if $s$ already fulfils this, a first search is done, increasing the given $s$ until for a first time this step does not hold.
Overall, a step size is sought that provides enough decrease, see [Bou23, p. 58] for more information.
Keyword arguments
additional_decrease_condition=(M, p) -> true: specify an additional criterion that has to be met to accept a step size in the decreasing loopadditional_increase_condition::IF=(M, p) -> true: specify an additional criterion that has to be met to accept a step size in the (initial) increase loopcandidate_point=allocate_result(M, rand): specify a point to be used as memory for the candidate points.contraction_factor=0.95: how to update $s$ in the decrease stepinitial_stepsize=1.0: specify an initial step sizeinitial_guess=ArmijoInitialGuess(): Compute the initial step size of a line search based on this function. SeeAbstractInitialLinesearchGuessfor details.retraction_method::AbstractRetractionMethod=default_retraction_method(M, typeof(p)): a retraction $\operatorname{retr}$ to use, see the section on retractionsstop_when_stepsize_less=0.0: a safeguard, stop when the decreasing step is below this (nonnegative) bound.stop_when_stepsize_exceeds=max_stepsize(M): a safeguard to not choose a too long step size when initially increasingstop_increasing_at_step=100: stop the initial increasing loop after this amount of steps. Set to0to never increase in the beginningstop_decreasing_at_step=1000: maximal number of Armijo decreases / tests to performsufficient_decrease=0.1: the sufficient decrease parameter $τ$
For the stop safe guards you can pass :Messages to a debug= to see @info messages when these happen.
This function generates a ManifoldDefaultsFactory for ArmijoLinesearchStepsize. For default values, that depend on the manifold, this factory postpones the construction until the manifold from for example a corresponding AbstractManoptSolverState is available.
Manopt.ConstantLength — Method
ConstantLength(s; kwargs...)
ConstantLength(M::AbstractManifold, s; kwargs...)Specify a Stepsize that is constant.
Input
M(optional)s=min(injectivity_radius(M)/2, 1.0): the length to use.
Keyword argument
type::Symbol=:relativespecify the type of constant step size. Possible values are:relative– scale the gradient tangent vector $X$ to $s*X$:absolute– scale the gradient to an absolute step length $s$, that is $\frac{s}{\lVert X \rVert}X$
This function generates a ManifoldDefaultsFactory for ConstantStepsize. For default values, that depend on the manifold, this factory postpones the construction until the manifold from for example a corresponding AbstractManoptSolverState is available.
Manopt.CubicBracketingLinesearch — Method
CubicBracketingLinesearch(; kwargs...)
CubicBracketingLinesearch(M::AbstractManifold; kwargs...)A functor representing the curvature minimizing cubic bracketing scheme introduced in [Hag89]. Firstly, a bracket $[a,b]$ is generated by multiplying $t_0$ chosen as last_stepsize (or in case of the first iteration initial_stepsize) repeatedly with the stepsize_increase > 1 until the bracket conditions
\[ ϕ'(a)(b-a) < 0 \quad \text{and} \quad ϕ(a) ≤ ϕ(b).\]
are satisfied by either $[a,b] = [t_{k-1},t_k]$, $[a,b] = [t_k,t_{k-1}]$, $[a,b] = [0,t_k]$, or $[a,b] = [t_k,0]$. Here, $ϕ(t)$ denotes the cost function when performing a step with size $t$ into direction $η$. Over the iteration, the bracket $[a,b]$ is repeatedly updated using a cubic polynomial using values of $ϕ, ϕ'$ at $a,b$. The update value $c$ is the local minimum of the polynomial, and the bracket condition ensures that it lies in between $a$ and $b$. We note that the update strategy taken from [Hag89] ensures that the updated bracket satisfies the bracket condition.
If the parameter hybrid is set to true, the hybrid approach from [Hag89] is activated, which prevents slow convergence in edge cases.
The algorithm terminates if at any point the found candidate stepsize suffices the curvature condition induced by sufficient_curvature, or the bracket $[a,b]$ is smaller than min_bracket_width.
Keyword arguments
p::P =rand(M): a point on the manifold $\mathcal{M}$ to store an interim resultinitial_stepsize=1.0: the step size to start the search withretraction_method::AbstractRetractionMethod=default_retraction_method(M, typeof(p)): a retraction $\operatorname{retr}$ to use, see the section on retractionsstepsize_increase=1.5: step size increase factor $>1$max_iterations=100: maximum number of iterationssufficient_curvature=0.2: target reduction of the curvature $(0,1)$min_bracket_width=1e-4: minimal size of the bracket $[a,b]$hybrid=true: use the hybrid strategyvector_transport_method::AbstractVectorTransportMethod=default_vector_transport_method(M, typeof(p)): a vector transport $\mathcal T_{⋅←⋅}$ to use, see the section on vector transports
This function generates a ManifoldDefaultsFactory for CubicBracketingLinesearch. For default values, that depend on the manifold, this factory postpones the construction until the manifold from for example a corresponding AbstractManoptSolverState is available.
Manopt.DecreasingLength — Method
DecreasingLength(; kwargs...)
DecreasingLength(M::AbstractManifold; kwargs...)Specify a Stepsize that is decreasing as $s_k = \frac{(l - ak)f^k}{(k+s)^e}$ with the following
Keyword arguments
exponent=1.0: the exponent $e$ in the denominatorfactor=1.0: the factor $f$ in the nominatorlength=isinf(manifold_dimension(M)) ? 1.0 : manifold_dimension(M)/2: the initial step size $l$.subtrahend=0.0: a value $a$ that is subtracted every iterationshift=0.0: shift the denominator iterator $k$ by $s$.type::Symbol=:relativespecify the type of step size. Possible values are:relative– scale the gradient tangent vector $X$ to $s_k*X$:absolute– scale the gradient to an absolute step length $s_k$, that is $\frac{s_k}{\lVert X \rVert}X$
This function generates a ManifoldDefaultsFactory for DecreasingStepsize. For default values, that depend on the manifold, this factory postpones the construction until the manifold from for example a corresponding AbstractManoptSolverState is available.
Manopt.DistanceOverGradients — Method
DistanceOverGradients(; kwargs...)
DistanceOverGradients(M::AbstractManifold; kwargs...)Create a factory for the DistanceOverGradientsStepsize, the Riemannian Distance over Gradients (RDoG) learning-rate-free stepsize from [DSN24]. It adapts without manual tuning, by combining the maximum distance from the start point with the accumulated gradient norms, optionally corrected by the geometric curvature term $ζ_κ$.
Definitions used by the implementation:
- $\bar r_t := \max(\,ϵ,\, \max_{0\le s\le t} d(p_0, p_s)\,)$ tracks the maximum geodesic distance from the initial point $p_0$ using the current iterate $p_t$.
- $G_t := \displaystyle\sum_{s=0}^t \lVert g_s \rVert^2$, where $g_s = \operatorname{grad} f(p_s)$.
At iteration $t$ the stepsize used here is
\[η_t = \begin{cases} \frac{\bar r_t}{\sqrt{G_t}}, & \text{if we do not use curvature,}\\ \frac{\bar r_t}{\sqrt{\,ζ_κ(\bar r_t)\,}\,\sqrt{G_t}}, & \text{if we use curvature.} \end{cases}\]
with the geometric curvature function $ζ_κ(d)$ defined in geometric_curvature_function. The initialization in this implementation follows the paper: on the first call ($t=0$), we set $G_0=\lVert g_0\rVert^2$, $\bar r_0 = ϵ$ and take
\[η_0 = \begin{cases} \frac{ϵ}{\lVert g_0\rVert}, & \text{if we do not use curvature,}\\ \frac{ϵ}{\sqrt{\,ζ_κ(ϵ)\,}\,\lVert g_0\rVert}, & \text{if we use curvature.} \end{cases}\]
On subsequent calls, the state is updated as implemented: $G_t ← G_{t-1} + \lVert g_t\rVert^2$ and $\bar r_t ← \max(\bar r_{t-1}, d(p_0,p_t))$.
Keyword arguments
initial_distance=1e-3: initial distance estimate $ϵ$use_curvature=false: whether to include $ζ_κ$sectional_curvature_bound=0.0: curvature lower bound $κ$ (if known)
This function generates a ManifoldDefaultsFactory for DistanceOverGradientsStepsize. For default values, that depend on the manifold, this factory postpones the construction until the manifold from for example a corresponding AbstractManoptSolverState is available.
Manopt.HagerZhangLinesearch — Method
HagerZhangLinesearch(; kwargs...)
HagerZhangLinesearch(M::AbstractManifold; kwargs...)A functor representing the line search introduced in [HZ06b].
It finds a step size satisfying the (standard or approximate) Wolfe conditions by bracketing and then narrowing the bracket with secant and bisection steps.
The following changes were made to the original algorithm from the paper:
- The algorithm bails out early of a secant update that is too close to one of the end points and switches to bisection. Original algorithm performs a similar check at a later stage. This precaution prevents a non-productive evaluation of the objective.
- Added
start_enforcing_wolfe_conditions_at_bracketing_iteration, since with a very low stepsize initialization that satisfies Wolfe conditions we might accept the initial stepsize and not notice that bracketing could help us reach the minimum earlier. Settingstart_enforcing_wolfe_conditions_at_bracketing_iterationto 1 reproduces the behavior of the original paper. For example a static initial stepsize equal to 1.0 could benefit from having this parameter increased. - The paper isn't entirely clear on what the final stepsize to return is. This implementation returns the last evaluated stepsize.
- The original algorithm doesn't specify what to do when the maximum stepsize is reached during the bracketing phase with a negative slope and an improvement over the initial point. This implementation allows for an early termination in this case, which seems reasonable since we can't expand the bracket anymore and this point is likely close to the minimum. By default this early termination is allowed, but it can be turned off via
allow_early_maxstep_terminationin which case the algorithm continues with the main loop even in this case.
Keyword arguments
candidate_point::P =rand(M): a point on the manifold $\mathcal{M}$ as temporary storage for candidatesretraction_method::AbstractRetractionMethod=default_retraction_method(M, typeof(p)): a retraction $\operatorname{retr}$ to use, see the section on retractionsvector_transport_method::AbstractVectorTransportMethod=default_vector_transport_method(M, typeof(p)): a vector transport $\mathcal T_{⋅←⋅}$ to use, see the section on vector transportsinitial_guess::AbstractInitialLinesearchGuess=HagerZhangInitialGuess(): initial linesearch guess strategyinitial_last_stepsize::Real = NaN: initial value for the stored last stepsizeinitial_last_cost::Real = NaN: initial value for the stored last coststepsize_limit::Real = Inf: upper bound for trial stepsizes during bracketingcandidate_direction = zero_vector(M, candidate_point): storage for transported directionsmax_bracket_iterations::Int = 10: maximum number of bracketing iterationsstart_enforcing_wolfe_conditions_at_bracketing_iteration::Int = initial_guess isa ConstantInitialGuess ? 2 : 1: bracketing iteration number at which Wolfe conditions are started to be enforced; setting to 1 may cause no bracketing to occur when the initial guess satisfies the Wolfe conditions.max_function_evaluations::Int = 20: maximum number of function evaluations per linesearchallow_early_maxstep_termination::Bool = true: whether to allow early termination when the maximum stepsize is reached with negative slope and an improvement over the initial point.wolfe_condition_mode::Symbol = :adaptive: one of:standard,:approximate, or:adaptive. Selects between (T1) and (T2) conditions in [HZ06b].ϵ::Real = 1.0e-6: initial allowed increase in function value in termination condition (T2). Allowed range:ϵ >= 0.δ::Real = 0.1: parameter for approximate Wolfe condition. Allowed range:0 < δ < 0.5andδ <= σ.σ::Real = 0.9: curvature condition parameter. Allowed range:δ <= σ < 1.ω::Real = 1.0e-3: interpolation safeguard parameter. Allowed range:0 <= ω <= 1.θ::Real = 0.5: bisection update parameter. Allowed range:0 < θ < 1.γ::Real = 0.66: determines when a bisection step is performed instead of secant. Allowed range:0 < γ < 1.ρ::Real = 5.0: bracketing expansion factor. Allowed range:ρ > 1.Δ::Real = 0.7: Parameter controlling the rate of change of Qₖ. Allowed range:0 <= Δ <= 1.secant_acceptance_ratio::Real = 1.0e-8: minimum relative interval length for accepting secant step. Allowed range:secant_acceptance_ratio >= 0. In case of rejection, a bisection step is performed instead.
This function generates a ManifoldDefaultsFactory for HagerZhangLinesearch. For default values, that depend on the manifold, this factory postpones the construction until the manifold from for example a corresponding AbstractManoptSolverState is available.
Manopt.NonmonotoneLinesearch — Method
NonmonotoneLinesearch(; kwargs...)
NonmonotoneLinesearch(M::AbstractManifold; kwargs...)A functor representing a nonmonotone line search using the Barzilai-Borwein step size [IP17].
This method first computes
\[y_{k} = \operatorname{grad}f(p_{k}) - \mathcal T_{p_k←p_{k-1}}\operatorname{grad}f(p_{k-1})\]
and
\[s_{k} = - α_{k-1} ⋅ \mathcal T_{p_k←p_{k-1}}\operatorname{grad}f(p_{k-1}),\]
where $α_{k-1}$ is the step size computed in the last iteration and $\mathcal T_{⋅←⋅}$ is a vector transport. Then the Barzilai—Borwein step size is
\[α_k^{\text{BB}} = \begin{cases} \min(α_{\text{max}}, \max(α_{\text{min}}, τ_{k})), & \text{if} ⟨s_{k}, y_{k}⟩_{p_k} > 0,\\\\ α_{\text{max}}, & \text{else,}\end{cases}\]
where
\[τ_{k} = \frac{⟨s_{k}, s_{k}⟩_{p_k}}{⟨s_{k}, y_{k}⟩_{p_k}},\]
if the direct strategy is chosen, or
\[τ_{k} = \frac{⟨s_{k}, y_{k}⟩_{p_k}}{⟨y_{k}, y_{k}⟩_{p_k}},\]
in case of the inverse strategy or an alternation between the two in cases for the alternating strategy. Then find the smallest $h = 0, 1, 2, …$ such that
\[f(\operatorname{retr}_{p_k}(- σ^h α_k^{\text{BB}} \operatorname{grad}f(p_k))) ≤ \max_{1 ≤ j ≤ \max(k+1,m)} f(p_{k+1-j}) - γ σ^h α_k^{\text{BB}} ⟨\operatorname{grad}f(p_k), \operatorname{grad}f(p_k)⟩_{p_k},\]
where $σ ∈ (0,1)$ is a step length reduction factor, $m$ is the number of iterations after which the function value has to be lower than the current one and $γ ∈ (0,1)$ is the sufficient decrease parameter. Finally the step size is computed as
\[α_k = σ^h α_k^{\text{BB}}.\]
Keyword arguments
p::P =rand(M): a point on the manifold $\mathcal{M}$ to store an interim resultinitial_guess = (problem, state, k, last_stepsize, η) -> k == 0 ? 1.0 : last_stepsize: a function to provide an initial guess for the step sizememory_size=10: number of iterations after which the cost value needs to be lower than the current onebb_min_stepsize=1e-3: lower bound for the Barzilai-Borwein step size, greater than zerobb_max_stepsize=1e3: upper bound for the Barzilai-Borwein step size, greater thanbb_min_stepsizeretraction_method::AbstractRetractionMethod=default_retraction_method(M, typeof(p)): a retraction $\operatorname{retr}$ to use, see the section on retractionsstrategy=:direct: defines if the new step size is computed using the:direct,:inverseor:alternatingstrategystorage=StoreStateAction(M; store_fields=[:Iterate, :Gradient]): increase efficiency by using aStoreStateActionfor:Iterateand:Gradient.stepsize_reduction=0.5: step size reduction factor contained in the interval $(0,1)$sufficient_decrease=1e-4: sufficient decrease parameter contained in the interval $(0,1)$stop_when_stepsize_less=0.0: smallest stepsize when to stop (the last one before is taken)stop_when_stepsize_exceeds=max_stepsize(M): largest stepsize when to stop to avoid leaving the injectivity radiusstop_increasing_at_step=100: last step to increase the stepsize (phase 1),stop_decreasing_at_step=1000: last step size to decrease the stepsize (phase 2),
Manopt.Polyak — Method
Polyak(; kwargs...)
Polyak(M::AbstractManifold; kwargs...)Compute a step size according to a method proposed by Polyak, cf. the Dynamic step size discussed in Section 3.2 of [Ber15]. This has been generalized here to both the Riemannian case and to approximate the minimum cost value.
Let $f_{\text{best}}$ be the best cost value seen until now during some iterative optimization algorithm and let $γ_k$ be a sequence of numbers that is square summable, but not summable.
Then the step size computed here reads
\[s_k = \frac{f(p^{(k)}) - f_{\text{best}} + γ_k}{\lVert ∂f(p^{(k)}) \rVert},\]
where $∂f$ denotes a nonzero-subgradient of $f$ at the current iterate $p^{(k)}$.
Constructor
Polyak(; γ = k -> 1/k, initial_cost_estimate=0.0)initialize the Polyak stepsize to a certain sequence and an initial estimate of $f_{\text{best}}$.
This function generates a ManifoldDefaultsFactory for PolyakStepsize. For default values, that depend on the manifold, this factory postpones the construction until the manifold from for example a corresponding AbstractManoptSolverState is available.
Manopt.WolfePowellBinaryLinesearch — Method
WolfePowellBinaryLinesearch(; kwargs...)
WolfePowellBinaryLinesearch(M::AbstractManifold; kwargs...)Perform a linesearch to fulfill both the Armijo-Goldstein conditions for some given sufficient decrease coefficient $c_1$ and some sufficient curvature condition coefficient $c_2$. Compared to WolfePowellLinesearch which tries a simpler method, this linesearch performs the following algorithm
With
\[A(t) = f(p_+) ≤ f(p) + c_1 t ⟨\operatorname{grad}f(p), X⟩_{p} \quad\text{ and }\quad W(t) = ⟨\operatorname{grad}f(p_+), \mathcal T_{p_+←p}X⟩_{p_+} ≥ c_2 ⟨X, \operatorname{grad}f(p)⟩_p,\]
where $p_+ =\operatorname{retr}_p(tX)$ is the current trial point, and $\mathcal T_{⋅←⋅}$ denotes a vector transport. Then the following Algorithm is performed similar to Algorithm 7 from [Hua14]
- set $α=0$, $β=∞$ and $t=1$.
- While either $A(t)$ does not hold or $W(t)$ does not hold do steps 3-5.
- If $A(t)$ fails, set $β=t$.
- If $A(t)$ holds but $W(t)$ fails, set $α=t$.
- If $β<∞$ set $t=\frac{α+β}{2}$, otherwise set $t=2α$.
Keyword arguments
sufficient_decrease=1e-4sufficient_curvature=0.999retraction_method::AbstractRetractionMethod=default_retraction_method(M, typeof(p)): a retraction $\operatorname{retr}$ to use, see the section on retractionsstop_when_stepsize_less=0.0: smallest stepsize when to stop (the last one before is taken)vector_transport_method::AbstractVectorTransportMethod=default_vector_transport_method(M, typeof(p)): a vector transport $\mathcal T_{⋅←⋅}$ to use, see the section on vector transports
Manopt.WolfePowellLinesearch — Method
WolfePowellLinesearch(; kwargs...)
WolfePowellLinesearch(M::AbstractManifold; kwargs...)Perform a linesearch to fulfill both the Armijo-Goldstein conditions
\[f\bigl( \operatorname{retr}_{p}(αX) \bigr) ≤ f(p) + c_1 α_k ⟨\operatorname{grad} f(p), X⟩_{p}\]
as well as the Wolfe conditions
\[\frac{\mathrm{d}}{\mathrm{d}t} f\bigl(\operatorname{retr}_{p}(tX)\bigr) \Big\vert_{t=α} ≥ c_2 \frac{\mathrm{d}}{\mathrm{d}t} f\bigl(\operatorname{retr}_{p}(tX)\bigr)\Big\vert_{t=0}.\]
for some given sufficient decrease coefficient $c_1$ and some sufficient curvature condition coefficient $c_2$.
This is adopted from [NW06, Section 3.1]
Keyword arguments
sufficient_decrease=1e-4sufficient_curvature=0.999p::P =rand(M): a point on the manifold $\mathcal{M}$ as temporary storage for candidatesX::T =zero_vector(M, p): a tangent vector at the point $p$ on the manifold $\mathcal{M}$ as type of memory allocated for the candidate directionmax_stepsize=max_stepsize(M): largest stepsize allowed here.retraction_method::AbstractRetractionMethod=default_retraction_method(M, typeof(p)): a retraction $\operatorname{retr}$ to use, see the section on retractionsstop_when_stepsize_less=0.0: smallest stepsize when to stop (the last one before is taken)stop_increasing_at_step=100: for the initial increase test (s_plus), stop after these many stepsstop_decreasing_at_step=1000: for the initial decrease test (s_minus), stop after these many stepsvector_transport_method::AbstractVectorTransportMethod=default_vector_transport_method(M, typeof(p)): a vector transport $\mathcal T_{⋅←⋅}$ to use, see the section on vector transports
Internal functions
Manopt.AdaptiveWNGradientStepsize — Type
AdaptiveWNGradientStepsize{I<:Integer,R<:Real,F<:Function} <: StepsizeA functor (problem, state, k, X) -> s implementing the adaptive gradient method introduced by [GS23]. See AdaptiveWNGradient for the mathematical details.
Fields
count_threshold::I: anIntegerfor $\hat{c}$minimal_bound::R: the value for $b_{\text{min}}$alternate_bound::F: how to determine $\hat{b}_k$ as a function of(bmin, bk, hat_c) -> hat_bkgradient_reduction::R: the gradient reduction factor threshold $α ∈ [0,1)$gradient_bound::R: the bound $b_k$.weight::R: $ω_k$, initialized to $ω_0 =$norm(M, p, X)if this is not zero,1.0otherwise.count::I: $c_k$, initialized to $c_0 = 0$.
Constructor
AdaptiveWNGradientStepsize(M::AbstractManifold; kwargs...)Keyword arguments
adaptive=true: switches thegradient_reduction$α$ (iftrue) to0.alternate_bound = (bk, hat_c) -> min(gradient_bound == 0 ? 1.0 : gradient_bound, max(minimal_bound, bk / (3 * hat_c)))count_threshold=4gradient_reduction::R=adaptive ? 0.9 : 0.0gradient_bound=norm(M, p, X)minimal_bound=1e-4p::P =rand(M): a point on the manifold $\mathcal{M}$ only used to define thegradient_boundX::T =zero_vector(M, p): a tangent vector at the point $p$ on the manifold $\mathcal{M}$ only used to define thegradient_bound
Manopt.ArmijoInitialGuess — Type
ArmijoInitialGuess <: AbstractInitialLinesearchGuessImplement the initial guess for an Armijo line search.
The initial step size is chosen as min(l, max_stepsize(M, p) / norm(M, p, η)), where l is the last step size used, p the current point and η the search direction.
The default provided is based on the max_stepsize(M, p).
Constructor
ArmijoInitialGuess()Manopt.ArmijoLinesearchStepsize — Type
ArmijoLinesearchStepsize <: LinesearchA functor (problem, state, k, X; kwargs...) -> s to provide an Armijo line search to compute a step size, based on the search direction X.
Fields
additional_decrease_condition: specify a condition a new point has to additionally fulfill. The default accepts all points.additional_increase_condition: specify a condition that additionally to checking a valid increase has to be fulfilled. The default accepts all points.candidate_point: to store an interim resultinitial_stepsize: an initial step sizeretraction_method::AbstractRetractionMethod=default_retraction_method(M, typeof(p)): a retraction $\operatorname{retr}$ to use, see the section on retractionscontraction_factor: factor the step size is multiplied with in the backtracking loopsufficient_decrease: gain within Armijo's rulelast_stepsize: the last step size to start the search withinitial_guess::F: a function to provide an initial guess for the step size, it maps(problem, state, k, last_stepsize, η) -> α_0based on- an
AbstractManoptProblemproblem - an
AbstractManoptSolverStatestate - the current iteration
k - the last step size
last_stepsize - the search direction
η
and should at least accept the keywords
lf0 =get_cost(problem, get_iterate(state)): the current cost atp, here interpreted as the initial point offalong the line search directionDlf0 =get_differential(problem, get_iterate(state), η): the directional derivative at pointpin directionη
- an
messages::NamedTuple: a named tuple to store possibleStepsizeMessageabout the stepsize search.stop_when_stepsize_less: smallest stepsize when to stop (the last one before is taken)stop_when_stepsize_exceeds: largest stepsize when to stop.stop_increasing_at_step: last step to increase the stepsize (phase 1),stop_decreasing_at_step: last step size to decrease the stepsize (phase 2),
Pass :Messages to a debug= to see @infos when these happen.
Constructor
ArmijoLinesearchStepsize(M::AbstractManifold; kwargs...)where the fields are set from the keyword arguments below and the retraction defaults to the default retraction on M.
Keyword arguments
candidate_point=allocate_result(M, rand)initial_stepsize=1.0retraction_method::AbstractRetractionMethod=default_retraction_method(M, typeof(p)): a retraction $\operatorname{retr}$ to use, see the section on retractionscontraction_factor=0.95sufficient_decrease=0.1last_stepsize=initial_stepsizeinitial_guess=ArmijoInitialGuess()stop_when_stepsize_less=0.0: stop when the stepsize decreased below this value.stop_when_stepsize_exceeds=max_stepsize(M): provide an absolute maximal step size.stop_increasing_at_step=100: for the initial increase test, stop after these many stepsstop_decreasing_at_step=1000: in the backtrack, stop after these many steps
Manopt.ConstantInitialGuess — Type
ConstantInitialGuess{TF} <: AbstractInitialLinesearchGuessImplement a constant initial guess for line searches.
Constructor
ConstantInitialGuess(α::TF)where α is the constant initial step size.
Manopt.ConstantStepsize — Type
ConstantStepsize <: StepsizeA functor (problem, state, ...) -> s to provide a constant step size s.
Fields
length: constant value for the step sizetype: a symbol that indicates whether the stepsize is relatively (:relative), with respect to the gradient norm, or absolutely (:absolute) constant.
Constructors
ConstantStepsize(s::Real, t::Symbol=:relative)initialize the stepsize to a constant s of type t.
ConstantStepsize( M::AbstractManifold=DefaultManifold(), s=min(injectivity_radius(M)/2, 1.0); type::Symbol=:relative)Manopt.CubicBracketingLinesearchStepsize — Type
CubicBracketingLinesearchStepsize{R<:Real,I<:Integer,TRM,VTM,P,T} <: LinesearchDo a bracketing line search to find a step size $α$ that finds a local minimum along the search direction $X$ starting from $p$, utilizing cubic polynomial interpolation. See CubicBracketingLinesearch for the mathematical details.
Fields
candidate_point::P: a point on the manifold $\mathcal{M}$ as temporary storage for candidatescandidate_direction::T: temporary storage for the transported search directioninitial_stepsize::R: the step size to start the search withlast_stepsize::Rretraction_method::AbstractRetractionMethod: a retraction $\operatorname{retr}$ to use, see the section on retractionsstepsize_increase::R: step size increase factor $>1$max_iterations::I: maximum number of iterationssufficient_curvature::R: target reduction of the curvature $(0,1)$min_bracket_width::R: minimal size of the bracket $[a,b]$hybrid::Bool: use the hybrid strategymax_stepsize::R: maximal stepsizevector_transport_method::AbstractVectorTransportMethod: a vector transport $\mathcal T_{⋅←⋅}$ to use, see the section on vector transports
Constructor
CubicBracketingLinesearchStepsize(M::AbstractManifold; kwargs...)CubicBracketingLinesearchStepsize(M::AbstractManifold, p; kwargs...)Keyword arguments
candidate_point::P =rand(M): a point on the manifold $\mathcal{M}$ as temporary storage for candidatesinitial_stepsize=1.0: the step size to start the search withretraction_method::AbstractRetractionMethod=default_retraction_method(M, typeof(p)): a retraction $\operatorname{retr}$ to use, see the section on retractionsstepsize_increase=1.5: step size increase factor $>1$max_iterations=100: maximum number of iterationssufficient_curvature=0.2: target reduction of the curvature $(0,1)$min_bracket_width=1e-4: minimal size of the bracket $[a,b]$hybrid=true: use the hybrid strategymax_stepsize= max_stepsize(M): maximal stepsizevector_transport_method::AbstractVectorTransportMethod=default_vector_transport_method(M, typeof(p)): a vector transport $\mathcal T_{⋅←⋅}$ to use, see the section on vector transports
Manopt.DecreasingStepsize — Type
DecreasingStepsize(M::AbstractManifold; kwargs...)A functor (problem, state, ...) -> s to provide a decreasing step size s.
Fields
exponent: a value $e$, the exponent the shifted iteration number is raised to in the denominatorfactor: a value $f$ to multiply the initial step size with every iterationlength: the initial step size $l$.subtrahend: a value $a$ that is subtracted every iterationshift: shift the denominator iterator $k$ by $s$.type: a symbol that indicates whether the stepsize is relatively (:relative), with respect to the gradient norm, or absolutely (:absolute) constant.
In total the complete formulae reads for the $k$th iterate as
\[s_k = \frac{(l - k a)f^k}{(k + s)^e}\]
and hence the default simplifies to just $s_k = \frac{l}{k}$
Constructor
DecreasingStepsize(M::AbstractManifold; length=isinf(manifold_dimension(M)) ? 1.0 : manifold_dimension(M)/2, factor=1.0, subtrahend=0.0, exponent=1.0, shift=0.0, type=:relative,)initializes all fields, where none of them is mandatory. The length defaults to half the manifold dimension, or to $1$ if that dimension is infinite.
Manopt.HagerZhangInitialGuess — Type
HagerZhangInitialGuess{TF <: Real, TPN, TVN} <: AbstractInitialLinesearchGuessInitial line search guess from the paper [HZ06b], following their initial-guess procedure I0. The line search was adapted to the Riemannian setting by introducing customizable norms for points and tangent vectors and a maximum stepsize alphamax.
Manopt.HagerZhangLinesearchStepsize — Type
HagerZhangLinesearchStepsize{TF<:Real,TIG,TRM,TVTM,TP,TX} <: LinesearchDo a bracketing line search to find a step size $α$ that finds a local minimum along the search direction $X$ starting from $p$, utilizing cubic polynomial interpolation using the method described in [HZ06b]. The function secant is used to find the minimum of the cubic polynomial fitted to values of the cost function and its derivative at the endpoints of the current interval. See HagerZhangLinesearch for the mathematical details.
Fields
candidate_point::P: a point on the manifold $\mathcal{M}$ as temporary storage for candidatesretraction_method::AbstractRetractionMethod: a retraction $\operatorname{retr}$ to use, see the section on retractionsvector_transport_method::AbstractVectorTransportMethod: a vector transport $\mathcal T_{⋅←⋅}$ to use, see the section on vector transportsinitial_guess: see keyword arguments ofHagerZhangLinesearchfor details.stepsize_limit: see keyword arguments ofHagerZhangLinesearchfor details.max_bracket_iterations: see keyword arguments ofHagerZhangLinesearchfor details.start_enforcing_wolfe_conditions_at_bracketing_iteration: see keyword arguments ofHagerZhangLinesearchfor details.allow_early_maxstep_termination: see keyword arguments ofHagerZhangLinesearchfor details.wolfe_condition_mode: see keyword arguments ofHagerZhangLinesearchfor details.ϵ,δ,σ,ω,θ,γ,ρ,Δ: see keyword arguments ofHagerZhangLinesearchfor details.secant_acceptance_ratio: see keyword arguments ofHagerZhangLinesearchfor details.candidate_direction,temporary_tangent: as temporary storage for tangent vectorstriples: temporary storage for function and derivative evaluationslast_evaluation_index: to keep track of the number of evaluations performed so far; points at the last filled entry oftriples.Qₖ,Cₖ: to keep track of the parameters of the Wolfe condition when in adaptive modecurrent_mode: to keep track of the current Wolfe condition mode when in adaptive modelast_stepsize: last stepsize computed since resetlast_cost: last cost value computed since resetϵₖ: the current ϵ parameter used in the approximate Wolfe condition and bracketing
Constructor
HagerZhangLinesearchStepsize(M::AbstractManifold; kwargs...)Manopt.NonmonotoneLinesearchStepsize — Type
NonmonotoneLinesearchStepsize{P,T,R<:Real,I<:Integer,TRM,VTM,TSSA,MSGS,IG} <: LinesearchA functor representing a nonmonotone line search using the Barzilai-Borwein step size [IP17].
Fields
initial_guess::F: a function to provide an initial guess for the step size, it maps(problem, state, k, last_stepsize, η) -> α_0based on- an
AbstractManoptProblemproblem - an
AbstractManoptSolverStatestate - the current iteration
k - the last step size
last_stepsize - the search direction
η
and should at least accept the keywords
lf0 =get_cost(problem, get_iterate(state)): the current cost atp, here interpreted as the initial point offalong the line search directionDlf0 =get_differential(problem, get_iterate(state), η): the directional derivative at pointpin directionη
- an
memory_size: number of iterations after which the cost value needs to be lower than the current onebb_min_stepsize: lower bound for the Barzilai-Borwein step size, greater than zerobb_max_stepsize: upper bound for the Barzilai-Borwein step size, greater thanbb_min_stepsizelast_stepsize: the last computed stepsizeretraction_method::AbstractRetractionMethod: a retraction $\operatorname{retr}$ to use, see the section on retractionsstrategy: defines if the new step size is computed using the:direct,:inverseor:alternatingstrategystorage: (for:Iterateand:Gradient) aStoreStateActionstepsize_reduction: step size reduction factor contained in the interval (0,1)sufficient_decrease: sufficient decrease parameter contained in the interval (0,1)vector_transport_method::AbstractVectorTransportMethod: a vector transport $\mathcal T_{⋅←⋅}$ to use, see the section on vector transportscandidate_point: to store an interim resultstop_when_stepsize_less: smallest stepsize when to stop (the last one before is taken)stop_when_stepsize_exceeds: largest stepsize when to stop.stop_increasing_at_step: last step to increase the stepsize (phase 1),stop_decreasing_at_step: last step size to decrease the stepsize (phase 2),
Constructor
NonmonotoneLinesearchStepsize(M::AbstractManifold; kwargs...)NonmonotoneLinesearchStepsize(M::AbstractManifold, p; kwargs...)Keyword arguments
p=allocate_result(M, rand): to store an interim resultinitial_guess = (problem, state, k, last_stepsize, η) -> k == 0 ? 1.0 : last_stepsizefunction to provide an initial guess for the stepsizememory_size=10bb_min_stepsize=1e-3bb_max_stepsize=1e3retraction_method::AbstractRetractionMethod=default_retraction_method(M, typeof(p)): a retraction $\operatorname{retr}$ to use, see the section on retractionsstrategy=:directstorage=StoreStateAction(M; store_fields=[:Iterate, :Gradient])stepsize_reduction=0.5sufficient_decrease=1e-4stop_when_stepsize_less=0.0stop_when_stepsize_exceeds=max_stepsize(M)stop_increasing_at_step=100stop_decreasing_at_step=1000vector_transport_method::AbstractVectorTransportMethod=default_vector_transport_method(M, typeof(p)): a vector transport $\mathcal T_{⋅←⋅}$ to use, see the section on vector transports
Manopt.PolyakStepsize — Type
PolyakStepsize <: StepsizeA functor (problem, state, ...) -> s to provide a step size due to Polyak, cf. Section 3.2 of [Ber15].
Fields
γ: a functionk -> ...representing a sequence.best_cost_value: storing the best cost value
Constructor
PolyakStepsize(; γ = k -> 1/k, initial_cost_estimate=0.0)Construct a stepsize of Polyak type.
See also
Manopt.StepsizeMessage — Type
StepsizeMessage{TBound, TS}A message struct to hold stepsize information, when e.g. a step size underflow happens at a certain iteration.
Fields
at_iteration::Int: The iteration at which the message was setbound::TBound: The bound that was hitvalue::TS: The corresponding value that either caused the message or provides additional information
Constructor
StepsizeMessage(; bound::TBound = 0.0, value::TS = 0.0)Manopt.UnivariateTriple — Type
UnivariateTriple{R <: Real}Triple of stepsize, function value and derivative value.
Fields
t::R: stepsizef::R: cost at stepsizetdf::R: derivative of the cost at stepsizet
Manopt.WolfePowellBinaryLinesearchStepsize — Type
WolfePowellBinaryLinesearchStepsize{TRM,VTM,F} <: LinesearchDo a backtracking line search to find a step size $α$ that fulfils the Wolfe conditions along a search direction $X$ starting from $p$. See WolfePowellBinaryLinesearch for the math details.
Fields
sufficient_decrease::F,sufficient_curvature::F: two constants in the line searchlast_stepsize::F: the last computed stepsizeretraction_method::AbstractRetractionMethod: a retraction $\operatorname{retr}$ to use, see the section on retractionsstop_when_stepsize_less::F: a safeguard to stop when the stepsize gets too smallvector_transport_method::AbstractVectorTransportMethod: a vector transport $\mathcal T_{⋅←⋅}$ to use, see the section on vector transports
Constructor
WolfePowellBinaryLinesearchStepsize(M::AbstractManifold; kwargs...)Keyword arguments
sufficient_decrease=1e-4sufficient_curvature=0.999retraction_method::AbstractRetractionMethod=default_retraction_method(M, typeof(p)): a retraction $\operatorname{retr}$ to use, see the section on retractionsstop_when_stepsize_less=0.0: smallest stepsize when to stop (the last one before is taken)vector_transport_method::AbstractVectorTransportMethod=default_vector_transport_method(M, typeof(p)): a vector transport $\mathcal T_{⋅←⋅}$ to use, see the section on vector transports
Manopt.WolfePowellLinesearchStepsize — Type
WolfePowellLinesearchStepsize{R<:Real,TRM,VTM,P,T,I,TMSG} <: LinesearchDo a backtracking line search to find a step size $α$ that fulfils the Wolfe conditions along a search direction $X$ starting from $p$. See WolfePowellLinesearch for the math details.
Fields
sufficient_decrease::R,sufficient_curvature::R: two constants in the line searchcandidate_direction::T: a tangent vector at the point $p$ on the manifold $\mathcal{M}$candidate_point::P: a point on the manifold $\mathcal{M}$ as temporary storage for candidateslast_stepsize::R: the last computed stepsizemax_stepsize::R: the largest stepsize allowedretraction_method::AbstractRetractionMethod: a retraction $\operatorname{retr}$ to use, see the section on retractionsstop_when_stepsize_less::R: a safeguard to stop when the stepsize gets too smallvector_transport_method::AbstractVectorTransportMethod: a vector transport $\mathcal T_{⋅←⋅}$ to use, see the section on vector transportsstop_increasing_at_step::I: last step to increase the stepsizestop_decreasing_at_step::I: last step to decrease the stepsizemessages::TMSG: a named tuple ofStepsizeMessages about the stepsize search
Constructor
WolfePowellLinesearchStepsize(M::AbstractManifold; kwargs...)WolfePowellLinesearchStepsize(M::AbstractManifold, p; kwargs...)Keyword arguments
sufficient_decrease=1e-4sufficient_curvature=0.999p::P =rand(M): a point on the manifold $\mathcal{M}$ to store an interim resultX::T =zero_vector(M, p): a tangent vector at the point $p$ on the manifold $\mathcal{M}$ as type of memory allocated for the candidate directionmax_stepsize=max_stepsize(M): largest stepsize allowed here.retraction_method::AbstractRetractionMethod=default_retraction_method(M, typeof(p)): a retraction $\operatorname{retr}$ to use, see the section on retractionsstop_when_stepsize_less=0.0: smallest stepsize when to stop (the last one before is taken)stop_increasing_at_step=100: for the initial increase test (s_plus), stop after these many stepsstop_decreasing_at_step=1000: for the initial decrease test (s_minus), stop after these many stepsvector_transport_method::AbstractVectorTransportMethod=default_vector_transport_method(M, typeof(p)): a vector transport $\mathcal T_{⋅←⋅}$ to use, see the section on vector transports
Manopt._hz_bracket — Method
_hz_bracket(
hzls::HagerZhangLinesearchStepsize, M::AbstractManifold,
mp::AbstractManoptProblem, p, η, c::Real, max_alpha::Real
)Perform the bracketing phase of the Hager-Zhang linesearch starting from an initial stepsize c and not exceeding max_alpha.
Returns a tuple (i_a, i_b, f_eval, f_wolfe, f_early_maxstep) where i_a and i_b are the indices in the stored function evaluations such that the minimum is bracketed between triples[i_a].t and triples[i_b].t. f_eval is true if the maximum number of function evaluations has been reached during the bracketing phase. f_wolfe is true if the Wolfe conditions have been satisfied. f_early_maxstep is true if the maximum stepsize was reached early with negative slope and an improvement over the initial point.
Manopt._hz_evaluate_next_step — Method
_hz_evaluate_next_step(
hzls::HagerZhangLinesearchStepsize, M::AbstractManifold,
mp::AbstractManoptProblem, p, η, α::Real
)Evaluate and store the next trial step for the Hager-Zhang linesearch.
Given the current iterate p, search direction η (in the tangent space at p), and a candidate step size α, this function
- Retracts from
palongηby stepαintohzls.candidate_point(usinghzls.retraction_method), - Vector-transports
ηto the candidate point intohzls.candidate_direction(usinghzls.vector_transport_method), - Evaluates the objective and directional derivative via
get_cost_and_differential(mp, hzls.candidate_point, hzls.candidate_direction), - Stores the resulting triple
(α, f, df)inhzls.triplesand incrementshzls.last_evaluation_index.
This helper is side-effecting by design; it mutates hzls' internal storage.
Return value
By default return a tuple with three values:
- the index
i_k::Intat which the new evaluation was stored. evaluation_limit_termination:trueiff the maximum number of stored evaluations has been reached.wolfe_terminationistrueiff the (standard or approximate) Wolfe conditions are satisfied for the current candidate, according tohzls.current_mode.
Errors
Throws an error if called more often than the maximum number of allocated function evaluations (i.e. if hzls.triples would overflow).
Manopt._hz_secant2 — Method
_hz_secant2(
hzls::HagerZhangLinesearchStepsize, M::AbstractManifold,
mp::AbstractManoptProblem, p, η, i_a::Int, i_b::Int
)Perform the secant-based update in the Hager-Zhang linesearch.
Computes a trial step using a secant interpolation of the bracketing endpoints. If the trial step is too close to an endpoint, falls back to a bisection step. Returns the updated bracketing indices and termination flags from the internal update routine.
Arguments
hzls: linesearch state and storage.M: manifold for retractions and transports.mp: optimization problem providing cost and differential.p: current iterate.η: search direction in the tangent space atp.i_a,i_b: indices of the current bracketing interval inhzls.triples.
Return value
Returns (i_A, i_B, i_c, f_eval, f_wolfe) where
i_A,i_B: indices bracketing the minimum after the update,i_c: index of the most recent evaluation (or-1if the candidate was out of range),f_eval:trueiff the evaluation limit has been reached,f_wolfe:trueiff the Wolfe conditions are satisfied.
Steps (S1-S4)
- S1: compute a secant trial
cfrom the current bracket and accept it unless too close to an endpoint (otherwise use a bisection step). - S2/S3: if the trial becomes a new endpoint, perform an update from that side.
- S4: return the updated bracket and termination flags.
Manopt._hz_update — Method
_hz_update(
hzls::HagerZhangLinesearchStepsize, M::AbstractManifold,
mp::AbstractManoptProblem, p, η, i_a::Int, i_b::Int, c::Real
)Perform an update procedure of the Hager-Zhang linesearch given the current bracketing indices i_a and i_b and a candidate stepsize c.
Returns indices and termination information (i_A, i_B, i_c, f_eval, f_wolfe) where the minimum is now bracketed between alpha_values[i_A] and alpha_values[i_B]. Index i_c indicates the position at which evaluation of the candidate c was stored. If the candidate c is outside of the current bracket, the last index is returned as -1. f_eval is true if the maximum number of function evaluations has been reached. f_wolfe is true if the Wolfe conditions have been satisfied at the candidate i_c.
Manopt.cubic_polynomial_argmin — Method
cubic_polynomial_argmin(a::UnivariateTriple, b::UnivariateTriple; warn::Bool = true)Returns the local minimizer of the cubic polynomial $p$ with $p(a.t)=a.f$, $p(b.t)=b.f$, $p'(a.t)=a.df$, $p'(b.t)=b.df$.
Input
a::UnivariateTriple{R}: triple of bracket valueab::UnivariateTriple{R}: triple of bracket valueb
Keyword arguments
warn::Bool: Boolean value if warnings should be displayed
Manopt.cubic_stepsize_update_step — Method
cubic_stepsize_update_step(a::Real, b::Real, c::Real, τ::Real)Step function to determine the stepsize update c described in [Hag89].
Input
a::Real: first value of the bracketb::Real: second value of the bracketc::Real: update valueτ::Real: minimal step tolerance
Manopt.default_point_distance — Method
default_point_distance(::AbstractManifold, p)The default Hager-Zhang guess for the distance between p and the solution to the optimization problem. The default is 0, which deactivates heuristic I0 (a). On each manifold with default_point_distance, you need to also implement default_vector_norm.
Manopt.default_point_distance — Method
default_point_distance(::DefaultManifold, p)Following [HZ06b], the expected distance to the optimal solution from p on DefaultManifold is the Inf norm of p.
Manopt.default_vector_norm — Method
default_vector_norm(M::AbstractManifold, p, X)The norm used by the Hager-Zhang initial guess to measure the search direction X at p. There is no default implementation, because it is only needed on manifolds that also provide a specific default_point_distance method.
Manopt.geometric_curvature_function — Method
geometric_curvature_function(κ::Real, d::Real)Compute the geometric curvature function $ζ_κ(d)$ used by the RDoG stepsize:
\[ζ_κ(d) = \begin{cases} 1, & \text{if } κ \ge 0,\\[4pt] \dfrac{\sqrt{|κ|}\,d}{\tanh(\sqrt{|κ|}\,d)}, & \text{if } κ < 0. \end{cases}\]
For small arguments, a Taylor approximation is used for numerical stability.
Manopt.get_message — Function
get_message(:stop_increasing, k::Int=-1, step::Real = NaN)Display a message string for stopping the increase of the step size at iteration k and the step size step chosen instead.
Manopt.get_message — Function
get_message(:stepsize_less, k::Int=-1, step::Real = NaN, bound::Real = NaN)Display a message string for the step size falling below its minimal bound at iteration k and the step size step used instead.
Manopt.get_message — Function
get_message(:non_descent_direction, k::Int)Display a message string for a non-descent direction encountered at iteration k.
Manopt.get_message — Function
get_message(:stop_decreasing, k::Int=-1, step::Real = NaN)Display a message string for stopping the decrease of the step size at iteration k and the step size step chosen instead.
Manopt.get_message — Function
get_message(a)Given a certain structure a from within Manopt.jl, retrieve its last message of information, e.g. warnings from a step size. If no message is available, an empty string is returned.
Manopt.get_message — Function
get_message(:stepsize_exceeds, k::Int, step::Real = NaN, bound::Real = NaN)Display a message string for a stepsize exceeding a certain bound at iteration k and the step size step chosen instead.
Manopt.get_message — Method
get_message(s::Symbol, args...)For a certain set of symbols s, this message function turns them into human readable strings. The arguments usually contain an iteration number k or bounds to communicate to the user.
Manopt.get_univariate_triple! — Method
get_univariate_triple!(mp::AbstractManoptProblem, cbls::CubicBracketingLinesearchStepsize, p, η, t::Real)Get the UnivariateTriple of the problem mp related to the step with stepsize $t$ from $p$ in direction $η$.
Input
mp::AbstractManoptProblemcbls::CubicBracketingLinesearchStepsize: containingretraction_method,vector_transportand the temporarycandidate_pointandcandidate_directionp: point in the manifold ofmpη: search direction atpt::Real: step size
Manopt.reset_messages! — Method
reset_messages!(messages::NamedTuple)Given a named tuple of StepsizeMessages, reset all messages to default values, i.e. at_iteration = -1, bound = 0, value = 0.
Manopt.secant — Method
secant(a::UnivariateTriple, b::UnivariateTriple)Returns the extremum of the quadratic polynomial $p$ with $p'(a.t)=a.df$, $p'(b.t)=b.df$.
The result is algebraically equivalent to (a.t * b.df - b.t * a.df) / (b.df - a.df) but the used formula is more numerically stable.
Input
a::UnivariateTriple{R}: triple of bracket valueab::UnivariateTriple{R}: triple of bracket valueb
Manopt.set_message! — Method
set_message!(messages::NamedTuple, key::Symbol; at=nothing, bound=nothing, value=nothing)Given a named tuple of StepsizeMessages, set the message identified by key to the provided values, i.e. if they are not nothing.
Manopt.set_message! — Method
set_message!(message::StepsizeMessage, at=nothing, bound=nothing, value=nothing)Set the fields of a single StepsizeMessage to the provided values, i.e. to those that are not nothing.
Manopt.update_bracket — Method
update_bracket(a::UnivariateTriple, b::UnivariateTriple, c::UnivariateTriple)Updates bracket w.r.t. the bracketing strategy in [Hag89] (R3) - (R5).
Input
a::UnivariateTriple{R}: triple of bracket valueab::UnivariateTriple{R}: triple of bracket valuebc::UnivariateTriple{R}: triple of update value