Skip to content

Commit b00f266

Browse files
committed
fix several documentation mistakes
* add 'curvature_loss_function' to the 'tutorial.custom_loss.rst' * fix header styling * fix doc-string
1 parent d5a63a3 commit b00f266

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

adaptive/learner/learner1D.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def uses_nth_neighbors(n):
3232
The next function is a part of the `curvature_loss_function` function.
3333
3434
>>> @uses_nth_neighbors(1)
35-
...def triangle_loss(xs, ys):
35+
... def triangle_loss(xs, ys):
3636
... xs = [x for x in xs if x is not None]
3737
... ys = [y for y in ys if y is not None]
3838
...

docs/source/tutorial/tutorial.LearnerND.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ lines. However, as always, when you sample more points the graph will
9292
become gradually smoother.
9393

9494
Using any convex shape as domain
95-
--------------------------------
95+
................................
9696

9797
Suppose you do not simply want to sample your function on a square (in 2D) or in
9898
a cube (in 3D). The LearnerND supports using a `scipy.spatial.ConvexHull` as

docs/source/tutorial/tutorial.custom_loss.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@ tl;dr, one can use the following *loss functions* that
4646

4747
+ `adaptive.learner.learner1D.default_loss`
4848
+ `adaptive.learner.learner1D.uniform_loss`
49+
+ `adaptive.learner.learner1D.curvature_loss_function`
4950
+ `adaptive.learner.learner2D.default_loss`
5051
+ `adaptive.learner.learner2D.uniform_loss`
5152
+ `adaptive.learner.learner2D.minimize_triangle_surface_loss`
5253
+ `adaptive.learner.learner2D.resolution_loss_function`
5354

55+
Whenever a loss function has `_function` appended to its name, it is a factory function
56+
that returns the loss function with certain settings.
5457

5558
Uniform sampling
5659
~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)