Skip to content

Commit da74872

Browse files
committed
Fix a few typos.
1 parent 6c87ee8 commit da74872

4 files changed

Lines changed: 17 additions & 10 deletions

File tree

src/plans/quasi_newton_plan.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,8 +754,8 @@ taking into account that the corresponding step size is chosen.
754754
755755
# Provided functors
756756
757-
* `(mp::AbstractManoptproblem, st::QuasiNewtonState) -> η` to compute the update direction
758-
* `(η, mp::AbstractManoptproblem, st::QuasiNewtonState) -> η` to compute the update direction in-place of `η`
757+
* `(mp::AbstractManoptProblem, st::QuasiNewtonState) -> η` to compute the update direction
758+
* `(η, mp::AbstractManoptProblem, st::QuasiNewtonState) -> η` to compute the update direction in-place of `η`
759759
760760
# Fields
761761

src/plans/stopping_criterion.jl

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ any point ``p = (p_1,…,p_n) ∈ $(_math(:M))`` is a vector of length ``n`` wit
244244
Then, denoting the `outer_norm` by ``r``, the distance of two points ``p,q ∈ $(_math(:M))``
245245
is given by
246246
247-
```
247+
```math
248248
$(_math(:distance))(p,q) = $(_tex(:Bigl))( $(_tex(:sum))_{k=1}^n $(_math(:distance))(p_k,q_k)^r $(_tex(:Bigr)))^{$(_tex(:frac, "1", "r"))},
249249
```
250250
@@ -575,7 +575,7 @@ any point ``p = (p_1,…,p_n) ∈ $(_math(:M))`` is a vector of length ``n`` wit
575575
Then, denoting the `outer_norm` by ``r``, the norm of the difference of tangent vectors like the last and current gradien ``X,Y ∈ $(_math(:M))``
576576
is given by
577577
578-
```
578+
```math
579579
$(_tex(:norm, "X-Y"; index = "p")) = $(_tex(:Bigl))( $(_tex(:sum))_{k=1}^n $(_tex(:norm, "X_k-Y_k"; index = "p_k"))^r $(_tex(:Bigr)))^{$(_tex(:frac, "1", "r"))},
580580
```
581581
@@ -686,8 +686,8 @@ A stopping criterion based on the current gradient norm.
686686
# Fields
687687
688688
* `norm`: a function `(M::AbstractManifold, p, X) -> ℝ` that computes a norm
689-
of the gradient `X` in the tangent space at `p` on `M``.
690-
For manifolds with components provide `(M::AbstractManifold, p, X, r) -> ℝ`.
689+
of the gradient `X` in the tangent space at `p` on `M`.
690+
For manifolds with components provide a function `(M::AbstractManifold, p, X, r) -> ℝ`.
691691
* `threshold`: the threshold to indicate to stop when the distance is below this value
692692
* `outer_norm`: if `M` is a manifold with components, this can be used to specify the norm,
693693
that is used to compute the overall distance based on the element-wise distance.
@@ -704,7 +704,7 @@ any point ``p = (p_1,…,p_n) ∈ $(_math(:M))`` is a vector of length ``n`` wit
704704
Then, denoting the `outer_norm` by ``r``, the norm of a tangent vector like the current gradient ``X ∈ $(_math(:M))``
705705
is given by
706706
707-
```
707+
```math
708708
$(_tex(:norm, "X"; index = "p")) = $(_tex(:Bigl))( $(_tex(:sum))_{k=1}^n $(_tex(:norm, "X_k"; index = "p_k"))^r $(_tex(:Bigr)))^{$(_tex(:frac, "1", "r"))},
709709
```
710710
@@ -1306,10 +1306,12 @@ Note that the cross product is in general noncommutative, and here only the orde
13061306
# Examples
13071307
13081308
A stopping criterion that indicates to stop whenever the gradient norm is less that `1e-6` for three consecutive iterations:
1309+
13091310
StopWhenRepeated(StopWhenGradientNormLess(1e-6), 3)
13101311
StopWhenGradientNormLess(1e-6) × 3
13111312
13121313
A stopping criterion that indicates to stop whenever the gradient norm is less that `1e-6` at three iterations (not necessarily consecutive):
1314+
13131315
StopWhenRepeated(StopWhenGradientNormLess(1e-6), 3; consecutive=false)
13141316
"""
13151317
mutable struct StopWhenRepeated{SC <: StoppingCriterion} <: StoppingCriterion
@@ -1392,7 +1394,9 @@ A stopping criterion, that only evaluates a certain (inner) stopping based on a
13921394
on the iterate `k`.
13931395
The condition is a function `condition(k) -> Bool`.
13941396
1395-
## Example `(k) -> >(n)` would only activate that stopping criterion after `n` iterations.`.
1397+
## Example
1398+
1399+
`(k) -> >(n)` would only activate that stopping criterion after `n` iterations.
13961400
13971401
## Fields
13981402
@@ -1409,6 +1413,7 @@ check the inner criterion. The `n` is ignored if you provide a manual functor `c
14091413
## Examples
14101414
14111415
A stopping criterion that indicates to stop when the gradient norm is small but only after the third iteration
1416+
14121417
StopWhenCriterionWithIterationCondition(StopWhenGradientNormLess(1e-6), 3)
14131418
14141419
You can also use the infix operators `≟` (`\\questeq` on REPL), `⩻` (`\\ltquest`), and `⩼` (`\\gtquest`) to create such a criterion:

tutorials/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/.quarto/
2+
3+
**/*.quarto_ipynb

tutorials/AutomaticDifferentiation.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ More generally take a change of the metric into account as
141141
= Df(p)[X] = g_p(\operatorname{grad}f(p), X)
142142
```
143143

144-
or in words: we have to change the Riesz representer of the (restricted/projected) differential of $f$ ($\tilde f$) to the one with respect to the Riemannian metric. This is done using ``[`change_representer`](@extref `ManifoldsBase.change_representer-Tuple{AbstractManifold, ManifoldsBase.AbstractMetric, Any, Any}`)``{=commonmark}.
144+
or in words: we have to change the Riesz representer of the (restricted/projected) differential of $f$ ($\tilde f$) to the one with respect to the Riemannian metric. This is done using ``[`change_representer`](@extref `ManifoldsBase.change_representer-Tuple{AbstractManifold, AbstractMetric, Any, Any}`)``{=commonmark}.
145145

146146
### A continued example
147147

@@ -187,7 +187,7 @@ This can be computed for symmetric positive definite matrices by summing the squ
187187
G(q) = sum(log.(eigvals(Symmetric(q))) .^ 2) / 2
188188
```
189189

190-
We can also interpret this as a function on the space of matrices and apply the Euclidean finite differences machinery; in this way we can easily derive the Euclidean gradient. But when computing the Riemannian gradient, we have to change the representer (see again ``[`change_representer`](@extref `ManifoldsBase.change_representer-Tuple{AbstractManifold, ManifoldsBase.AbstractMetric, Any, Any}`)``{=commonmark}) after projecting onto the tangent space $T_p\mathcal P(n)$ at $p$.
190+
We can also interpret this as a function on the space of matrices and apply the Euclidean finite differences machinery; in this way we can easily derive the Euclidean gradient. But when computing the Riemannian gradient, we have to change the representer (see again ``[`change_representer`](@extref `ManifoldsBase.change_representer-Tuple{AbstractManifold, AbstractMetric, Any, Any}`)``{=commonmark}) after projecting onto the tangent space $T_p\mathcal P(n)$ at $p$.
191191

192192
Let's first define a point and the manifold $N=\mathcal P(3)$.
193193

0 commit comments

Comments
 (0)