Skip to content

Commit 997ea31

Browse files
committed
Fix a few typos
1 parent 962ae49 commit 997ea31

2 files changed

Lines changed: 41 additions & 33 deletions

File tree

src/documentation_glossary.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ define!(:LaTeX, :transp, raw"\mathrm{T}")
120120
define!(:LaTeX, :vdots, raw"\vdots")
121121
define!(:LaTeX, :vert, raw"\vert")
122122
define!(:LaTeX, :widehat, (letter) -> raw"\widehat{" * "$letter" * "}")
123-
define!(:LaTeX, :widetilde, raw"\widetilde")
123+
define!(:LaTeX, :widetilde, (letter) -> raw"\widetilde{" * "$letter" * "}")
124124
_tex(args...; kwargs...) = glossary(:LaTeX, args...; kwargs...)
125125
#
126126
# ---

src/plans/quasi_newton_plan.jl

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,16 @@ struct InverseDFP <: AbstractQuasiNewtonUpdateRule end
136136
137137
indicates in [`AbstractQuasiNewtonDirectionUpdate`](@ref) that the Riemannian SR1 update is used in the Riemannian quasi-Newton method.
138138
139-
Denote by ``$(_tex(:widetilde, "H"))_k^$(_tex(:rm, "SR1"))`` the operator concatenated with a vector transport and its inverse before and after to act on ``x_{k+1} = R_{x_k}(α_k η_k)``.
139+
Denote by ``$(_tex(:widetilde, "H"))_k^{$(_tex(:rm, "SR1"))}`` the operator concatenated with a vector transport and its inverse before and after to act on ``x_{k+1} = R_{x_k}(α_k η_k)``.
140140
Then the update formula reads
141141
142142
```math
143-
H^$(_tex(:rm, "SR1"))_{k+1} = $(_tex(:widetilde, "H"))^$(_tex(:rm, "SR1"))_k
143+
H^{$(_tex(:rm, "SR1"))}_{k+1} = $(_tex(:widetilde, "H"))^{$(_tex(:rm, "SR1"))}_k
144144
+ $(
145145
_tex(
146146
:frac,
147-
"(y_k - $(_tex(:widetilde, "H"))^$(_tex(:rm, "SR1"))_k s_k) (y_k - $(_tex(:widetilde, "H"))^$(_tex(:rm, "SR1"))_k s_k)^{$(_tex(:rm, "T"))}",
148-
"(y_k - $(_tex(:widetilde, "H"))^$(_tex(:rm, "SR1"))_k s_k)^{$(_tex(:rm, "T"))} s_k",
147+
"(y_k - $(_tex(:widetilde, "H"))^{$(_tex(:rm, "SR1"))}_k s_k) (y_k - $(_tex(:widetilde, "H"))^{$(_tex(:rm, "SR1"))}_k s_k)^{$(_tex(:rm, "T"))}",
148+
"(y_k - $(_tex(:widetilde, "H"))^{$(_tex(:rm, "SR1"))}_k s_k)^{$(_tex(:rm, "T"))} s_k",
149149
)
150150
)
151151
```
@@ -160,7 +160,7 @@ $(_tex(:grad))f(x_{k+1}) - T^{S}_{x_k, α_k η_k}($(_tex(:grad))f(x_k)) ∈ T_{x
160160
respectively.
161161
162162
This method can be stabilized by only performing the update if denominator is larger than
163-
``r$(_tex(:norm, "s_k"; index = "x_{k+1}"))$(_tex(:norm, "y_k - $(_tex(:widetilde, "H"))^$(_tex(:rm, "SR1"))_k s_k"; index = "x_{k+1}"))``
163+
``r$(_tex(:norm, "s_k"; index = "x_{k+1}"))$(_tex(:norm, "y_k - $(_tex(:widetilde, "H"))^{$(_tex(:rm, "SR1"))}_k s_k"; index = "x_{k+1}"))``
164164
for some ``r>0``. For more details, see Section 6.2 in [NocedalWright:2006](@cite).
165165
166166
# Constructor
@@ -178,16 +178,18 @@ end
178178
179179
indicates in [`AbstractQuasiNewtonDirectionUpdate`](@ref) that the inverse Riemannian SR1 update is used in the Riemannian quasi-Newton method.
180180
181-
Denote by ``$(_tex(:widetilde, "B"))_k^$(_tex(:rm, "SR1"))`` the operator concatenated with a vector transport and its inverse before and after to act on ``x_{k+1} = R_{x_k}(α_k η_k)``.
181+
Denote by ``$(_tex(:widetilde, "B"))_k^{$(_tex(:rm, "SR1"))}`` the operator concatenated with a vector transport and its inverse before and after to act on ``x_{k+1} = R_{x_k}(α_k η_k)``.
182182
Then the update formula reads
183183
184184
```math
185-
B^$(_tex(:rm, "SR1"))_{k+1} = $(_tex(:widetilde, "B"))^$(_tex(:rm, "SR1"))_k
186-
+ \frac{
187-
(s_k - $(_tex(:widetilde, "B"))^$(_tex(:rm, "SR1"))_k y_k) (s_k - $(_tex(:widetilde, "B"))^$(_tex(:rm, "SR1"))_k y_k)^{$(_tex(:rm, "T"))}
188-
}{
189-
(s_k - $(_tex(:widetilde, "B"))^$(_tex(:rm, "SR1"))_k y_k)^{$(_tex(:rm, "T"))} y_k
190-
}
185+
B^{$(_tex(:rm, "SR1"))}_{k+1} = $(_tex(:widetilde, "B"))^{$(_tex(:rm, "SR1"))}_k
186+
+ $(
187+
_tex(
188+
:frac,
189+
"(s_k - $(_tex(:widetilde, "B"))^{$(_tex(:rm, "SR1"))}_k y_k) (s_k - $(_tex(:widetilde, "B"))^{$(_tex(:rm, "SR1"))}_k y_k)^{$(_tex(:rm, "T"))}",
190+
"(s_k - $(_tex(:widetilde, "B"))^{$(_tex(:rm, "SR1"))}_k y_k)^{$(_tex(:rm, "T"))} y_k"
191+
)
192+
)
191193
```
192194
193195
where ``s_k`` and ``y_k`` are the coordinate vectors with respect to the current basis (from [`QuasiNewtonState`](@ref)) of
@@ -200,7 +202,7 @@ $(_tex(:grad))f(x_{k+1}) - T^{S}_{x_k, α_k η_k}($(_tex(:grad))f(x_k)) ∈ T_{x
200202
respectively.
201203
202204
This method can be stabilized by only performing the update if denominator is larger than
203-
``r$(_tex(:norm, "y_k"; index = "x_{k+1}"))$(_tex(:norm, "s_k - $(_tex(:widetilde, "H"))^$(_tex(:rm, "SR1"))_k y_k"; index = "x_{k+1}"))``
205+
``r$(_tex(:norm, "y_k"; index = "x_{k+1}"))$(_tex(:norm, "s_k - $(_tex(:widetilde, "H"))^{$(_tex(:rm, "SR1"))}_k y_k"; index = "x_{k+1}"))``
204206
for some ``r>0``. For more details, see Section 6.2 in [NocedalWright:2006](@cite).
205207
206208
# Constructor
@@ -222,14 +224,20 @@ Denote by ``$(_tex(:widetilde, "H"))_k^$(_tex(:rm, "Br"))`` the operator concate
222224
Then the update formula reads
223225
224226
```math
225-
H^$(_tex(:rm, "Br"))_{k+1} = $(_tex(:widetilde, "H"))^$(_tex(:rm, "Br"))_k
226-
- $(_tex(:frac, "$(_tex(:widetilde, "H"))^$(_tex(:rm, "Br"))_k s_k s^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "H"))^$(_tex(:rm, "Br"))_k}{s^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "H"))^$(_tex(:rm, "Br"))_k s_k} + \frac{y_k y^{$(_tex(:rm, "T"))}_k", "s^{$(_tex(:rm, "T"))}_k y_k"))
227-
+ φ_k s^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "H"))^$(_tex(:rm, "Br"))_k s_k
228-
$(_tex(:Bigl))(
229-
$(_tex(:frac, "y_k", "s^{$(_tex(:rm, "T"))}_k y_k")) - $(_tex(:frac, "$(_tex(:widetilde, "H"))^$(_tex(:rm, "Br"))_k s_k", "s^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "H"))^$(_tex(:rm, "Br"))_k s_k"))
227+
H^{$(_tex(:rm, "Br"))}_{k+1}
228+
= $(_tex(:widetilde, "H"))^{$(_tex(:rm, "Br"))}_k - $(
229+
_tex(
230+
:frac,
231+
"$(_tex(:widetilde, "H"))^{$(_tex(:rm, "Br"))}_k s_k s^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "H"))^{$(_tex(:rm, "Br"))}_k",
232+
"s^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "H"))^{$(_tex(:rm, "Br"))}_k s_k"
233+
)
234+
) + $(_tex(:frac, "y_k y^{$(_tex(:rm, "T"))}_k", "s^{$(_tex(:rm, "T"))}_k y_k"))
235+
+ φ_k s^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "H"))^{$(_tex(:rm, "Br"))}_k s_k
236+
$(_tex(:Bigl))(
237+
$(_tex(:frac, "y_k", "s^{$(_tex(:rm, "T"))}_k y_k")) - $(_tex(:frac, "$(_tex(:widetilde, "H"))^{$(_tex(:rm, "Br"))}_k s_k", "s^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "H"))^{$(_tex(:rm, "Br"))}_k s_k"))
230238
$(_tex(:Bigr)))
231239
$(_tex(:Bigl))(
232-
$(_tex(:frac, "y_k", "s^{$(_tex(:rm, "T"))}_k y_k")) - $(_tex(:frac, "$(_tex(:widetilde, "H"))^$(_tex(:rm, "Br"))_k s_k", "s^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "H"))^$(_tex(:rm, "Br"))_k s_k"))
240+
$(_tex(:frac, "y_k", "s^{$(_tex(:rm, "T"))}_k y_k")) - $(_tex(:frac, "$(_tex(:widetilde, "H"))^{$(_tex(:rm, "Br"))}_k s_k", "s^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "H"))^{$(_tex(:rm, "Br"))}_k s_k"))
233241
$(_tex(:Bigr)))^{$(_tex(:rm, "T"))}
234242
```
235243
@@ -263,24 +271,24 @@ and its inverse before and after to act on ``x_{k+1} = R_{x_k}(α_k η_k)``.
263271
Then the update formula reads
264272
265273
```math
266-
B^$(_tex(:rm, "Br"))_{k+1}
267-
= $(_tex(:widetilde, "B"))^$(_tex(:rm, "Br"))_k
274+
B^{$(_tex(:rm, "Br"))}_{k+1}
275+
= $(_tex(:widetilde, "B"))^{$(_tex(:rm, "Br"))}_k
268276
- $(
269277
_tex(
270278
:frac,
271-
"$(_tex(:widetilde, "B"))^$(_tex(:rm, "Br"))_k y_k y^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "B"))^$(_tex(:rm, "Br"))_k",
272-
"y^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "B"))^$(_tex(:rm, "Br"))_k y_k"
279+
"$(_tex(:widetilde, "B"))^{$(_tex(:rm, "Br"))}_k y_k y^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "B"))^{$(_tex(:rm, "Br"))}_k",
280+
"y^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "B"))^{$(_tex(:rm, "Br"))}_k y_k"
273281
)
274282
)
275283
+ $(_tex(:frac, "s_k s^{$(_tex(:rm, "T"))}_k", "s^{$(_tex(:rm, "T"))}_k y_k"))
276-
+ φ_k y^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "B"))^$(_tex(:rm, "Br"))_k y_k
284+
+ φ_k y^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "B"))^{$(_tex(:rm, "Br"))}_k y_k
277285
$(_tex(:Bigl))(
278286
$(_tex(:frac, "s_k", "s^{$(_tex(:rm, "T"))}_k y_k"))
279-
- $(_tex(:frac, "$(_tex(:widetilde, "B"))^$(_tex(:rm, "Br"))_k y_k", "y^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "B"))^$(_tex(:rm, "Br"))_k y_k"))
287+
- $(_tex(:frac, "$(_tex(:widetilde, "B"))^{$(_tex(:rm, "Br"))}_k y_k", "y^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "B"))^{$(_tex(:rm, "Br"))}_k y_k"))
280288
$(_tex(:Bigr)))
281289
$(_tex(:Bigl))(
282290
$(_tex(:frac, "s_k", "s^{$(_tex(:rm, "T"))}_k y_k"))
283-
- $(_tex(:frac, "$(_tex(:widetilde, "B"))^$(_tex(:rm, "Br"))_k y_k", "y^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "B"))^$(_tex(:rm, "Br"))_k y_k"))
291+
- $(_tex(:frac, "$(_tex(:widetilde, "B"))^{$(_tex(:rm, "Br"))}_k y_k", "y^{$(_tex(:rm, "T"))}_k $(_tex(:widetilde, "B"))^{$(_tex(:rm, "Br"))}_k y_k"))
284292
$(_tex(:Bigr)))^{$(_tex(:rm, "T"))}
285293
```
286294
@@ -507,7 +515,7 @@ end
507515
_doc_QN_B = """
508516
```math
509517
$(_tex(:Cal, "B"))_k^{(0)}[⋅]
510-
= $(_tex(:frac, "$(_tex(:inner, "s_{k-1}", "y_{k-1}"; index = "p_k"))", "$(_tex(:inner, "y_{k-1}", "y_{k-1}"; index = "p_k"))"))$(_tex(:Id))_{$(_math(:TpM))"[⋅]
518+
= $(_tex(:frac, "$(_tex(:inner, "s_{k-1}", "y_{k-1}"; index = "p_k"))", "$(_tex(:inner, "y_{k-1}", "y_{k-1}"; index = "p_k"))"))$(_tex(:Id))_{$(_math(:TpM))}[⋅]
511519
```
512520
"""
513521

@@ -516,19 +524,19 @@ $(_tex(:Cal, "B"))_k^{(0)}[⋅]
516524
517525
This [`AbstractQuasiNewtonDirectionUpdate`](@ref) represents the limited-memory Riemannian BFGS update,
518526
where the approximating operator is represented by ``m`` stored pairs of tangent
519-
vectors ``$(_math(:Sequence, _tex(:widehat, "s"), "i", "k-m", "k-1"))`` and ``$(_math(:Sequence, _tex(:widehat, "y"), "i", "k-m", "k-1"))`` in the ``k``-th iteration.
520-
For the calculation of the search direction ``X_k``, the generalisation of the two-loop recursion
521-
is used (see [HuangGallivanAbsil:2015](@cite)),
527+
vectors ``$(_math(:Sequence, "$(_tex(:widetilde, "s"))", "i", "k-m", "k-1"))`` and ``$(_math(:Sequence, "$(_tex(:widetilde, "y"))", "i", "k-m", "k-1"))``
528+
in the ``k``-th iteration. For the calculation of the search direction ``X_k``, the generalisation
529+
of the two-loop recursion is used (see [HuangGallivanAbsil:2015](@cite)),
522530
since it only requires inner products and linear combinations of tangent vectors in ``$(_math(:TpM; p = "p_k"))``.
523-
For that the stored pairs of tangent vectors ``$(_tex(:widehat, "s"))_i, $(_tex(:widehat, "y"))_i``,
531+
For that the stored pairs of tangent vectors ``s_i, y_i``,
524532
the gradient ``$(_tex(:grad)) f(p_k)`` of the objective function ``f`` in ``p_k``
525533
and the positive definite self-adjoint operator
526534
527535
$(_doc_QN_B)
528536
529537
are used. The two-loop recursion can be understood as that the [`InverseBFGS`](@ref) update
530538
is executed ``m`` times in a row on ``$(_tex(:Cal, "B"))^{(0)}_k[⋅]`` using the tangent vectors ``$(_tex(:widehat, "s"))_i,$(_tex(:widehat, "y"))_i``,
531-
and in the same time the resulting operator ``$(_tex(:Cal, "B"))^{LRBFGS}_k [⋅]`` is directly applied on ``$(_tex(:grad))f(x_k)``.
539+
and in the same time the resulting operator ``$(_tex(:Cal, "B"))^{$(_tex(:rm, "LRBFGS"))}_k [⋅]`` is directly applied on ``$(_tex(:grad))f(x_k)``.
532540
When updating there are two cases: if there is still free memory, ``k < m``, the previously
533541
stored vector pairs ``$(_tex(:widehat, "s"))_i,$(_tex(:widehat, "y"))_i`` have to be
534542
transported into the upcoming tangent space ``$(_math(:TpM; p = "p_{k+1}"))``.

0 commit comments

Comments
 (0)