Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran committed Dec 15, 2024
1 parent 047cd50 commit fb1d553
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/Bezier-curves.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ end
```

Which is the following cure, which clearly starts and ends slower than its speed in the middle,
which can be seen by the increasing length of the gangent vectors in the middle.
which can be seen by the increasing length of the tangent vectors in the middle.

![The original curve](img/bezier/bezier-acceleration-orig.png)

Expand Down
10 changes: 5 additions & 5 deletions examples/Difference-of-Convex-Frank-Wolfe.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ date: 11/06/2023

## Introduction

In this example we compare the Difference of Convex Algprithm (DCA) [BergmannFerreiraSantosSouza:2023](@cite)
In this example we compare the Difference of Convex Algorithm (DCA) [BergmannFerreiraSantosSouza:2023](@cite)
with the Frank-Wolfe Algorithm, which was introduced in [WeberSra:2022](@cite).
This example reproduces the results from [BergmannFerreiraSantosSouza:2023](@cite), Section 7.3.

Expand Down Expand Up @@ -131,7 +131,7 @@ and $D=(d_{ij})$.
@doc raw"""
closed_form_solution!(M, q, L, U, p X)
Compute the closeed form solution of the constraint sub problem in place of ``q``.
Compute the closed form solution of the constraint sub problem in place of ``q``.
"""
function closed_form_solution!(M::SymmetricPositiveDefinite, q, L, U, p, X)
# extract p^1/2 and p^{-1/2}
Expand Down Expand Up @@ -284,7 +284,7 @@ Let's compare both methods when they have the same stopping criteria
sub_problem=dc_sub_solution_safe!,
evaluation=InplaceEvaluation(),
stopping_criterion = StopAfterIteration(300) |
StopWhenChangeLess(1e-14) | StopWhenGradientChangeLess(M, 1e-9),
StopWhenChangeLess(M, 1e-14) | StopWhenGradientChangeLess(M, 1e-9),
debug = [
(:Iteration, "# %-8d "), (:Cost, "F(p): %0.14f"), (:Change, " |Δp|: %0.14f "),
(:GradientNorm, " |grad f(p)|: %0.8f "),
Expand Down Expand Up @@ -314,7 +314,7 @@ For the statistics we extract the recordings from the state

## Define the Frank-Wolfe functions

For Frank wolfe, the cost is just defined as $-h(p)$ but the minimisation is constraint to $\mathcal C$, which is enfored by the oracle.
For Frank wolfe, the cost is just defined as $-h(p)$ but the minimisation is constraint to $\mathcal C$, which is enforced by the oracle.

```{julia}
#| output: false
Expand All @@ -335,7 +335,7 @@ Similarly we can run the Frank-Wolfe algorithm with
sub_problem=oracle_fw!,
evaluation=InplaceEvaluation(),
stopping_criterion = StopAfterIteration(10^4) |
StopWhenChangeLess(1e-14) | StopWhenGradientChangeLess(M, 1e-9),
StopWhenChangeLess(M, 1e-14) | StopWhenGradientChangeLess(M, 1e-9),
debug = [
(:Iteration, "# %-8d "), :Cost, (:Change, " |Δp|: %0.14f "),
(:GradientNorm, " |grad f(p)|: %0.8f "),
Expand Down

0 comments on commit fb1d553

Please sign in to comment.