Skip to content

Commit 3252e09

Browse files
committed
more doc tweaks
1 parent f0c68d5 commit 3252e09

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

docs/src/anatomy_of_an_implementation.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ predictions.
166166
## Algorithm traits
167167

168168
Algorithm [traits](@ref traits) record extra generic information about an algorithm, or
169-
make specific promises of behavior. They usually have an algorithm as the single
170-
argument. We regard [`LearnAPI.constructor`](@ref) defined above as a trait.
169+
make specific promises of behavior. They usually have an algorithm as the single argument,
170+
and so we also regard [`LearnAPI.constructor`](@ref) defined above as a trait.
171171

172172
In LearnAPI.jl `predict` always outputs a [target or target proxy](@ref proxy), where
173173
"target" is understood very broadly. We overload a trait to record the fact here that the
@@ -214,9 +214,10 @@ traits_list) to see which might apply to a new implementation, to enable maximum
214214
functionality provided by third party packages, and to assist third party algorithms that
215215
match machine learning algorithms to user-defined tasks.
216216

217-
Having set `LearnAPI.target(::Ridge) == true` we are obliged to overload a multi-argument
218-
version of `LearnAPI.target` to extract the target from the `data` that gets supplied to
219-
`fit`:
217+
According to the contract articulated in its document string, having set
218+
[`LearnAPI.target(::Ridge)`](@ref) equal to `true`, we are obliged to overload a
219+
multi-argument version of `LearnAPI.target` to extract the target from the `data` that
220+
gets supplied to `fit`:
220221

221222
```@example anatomy
222223
LearnAPI.target(::Ridge, data) = last(data)

docs/src/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ A base Julia interface for machine learning and statistics </span>
1212
LearnAPI.jl is a lightweight, functional-style interface, providing a collection of
1313
[methods](@ref Methods), such as `fit` and `predict`, to be implemented by algorithms from
1414
machine learning and statistics. Through such implementations, these algorithms buy into
15-
functionality, such as hyperparameter optimization, as provided by ML/statistics toolboxes
16-
and other packages. LearnAPI.jl also provides a number of Julia [traits](@ref traits) for
17-
promising specific behavior.
15+
functionality, such as hyperparameter optimization and model composition, as provided by
16+
ML/statistics toolboxes and other packages. LearnAPI.jl also provides a number of Julia
17+
[traits](@ref traits) for promising specific behavior.
1818

1919
```@raw html
2020
&#128679;
@@ -78,7 +78,7 @@ opts out. The `fit` and `predict` methods consume these alternative representati
7878
The fallback data interface is the [MLUtils.jl](https://github.com/JuliaML/MLUtils.jl)
7979
`getobs/numobs` interface, and if the input consumed by the algorithm already implements
8080
that interface (tables, arrays, etc.) then overloading `obs` is completely optional. A
81-
plain iteration interface (to support, e.g., data loaders reading images from disk files)
81+
plain iteration interface (to support, e.g., data loaders reading images from disk)
8282
can also be specified.
8383

8484
## Learning more

docs/src/reference.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,15 @@ compared with censored ground truth survival times.
5454

5555
#### Definitions
5656

57-
More generally, whenever we have a variable (e.g., a class label) that can (in principle)
58-
can be paired with a predicted value, or some predicted "proxy" for that variable (such as
59-
a class probability), then we call the variable a *target* variable, and the predicted
60-
output a *target proxy*. In this definition, it is immaterial whether or not the target
61-
appears in training (is supervised) or whether or not the model generalizes to new
57+
More generally, whenever we have a variable (e.g., a class label) that can, at least in
58+
principle, be paired with a predicted value, or some predicted "proxy" for that variable
59+
(such as a class probability), then we call the variable a *target* variable, and the
60+
predicted output a *target proxy*. In this definition, it is immaterial whether or not the
61+
target appears in training (is supervised) or whether or not the model generalizes to new
6262
observations ("learns").
6363

6464
LearnAPI.jl provides singleton [target proxy types](@ref proxy_types) for prediction
65-
dispatch in LearnAPI.jl. These are also used to distinguish performance metrics provided
66-
by the package
65+
dispatch. These are also used to distinguish performance metrics provided by the package
6766
[StatisticalMeasures.jl](https://juliaai.github.io/StatisticalMeasures.jl/dev/).
6867

6968

@@ -151,8 +150,9 @@ Only these method names are exported by LearnAPI: `fit`, `transform`, `inverse_t
151150
[`LearnAPI.constructor`](@ref) and [`LearnAPI.functions`](@ref) are universally
152151
compulsory.
153152

154-
- [`LearnAPI.target`](@ref) and [`LearnAPI.weights`](@ref) are both traits and methods to
155-
extract, from `fit` input data, the target and per-observation weights, when available.
153+
- [`LearnAPI.target`](@ref) and [`LearnAPI.weights`](@ref) are traits which also include
154+
extended signatures for extracting, from `fit` input data, the target and
155+
per-observation weights, when available.
156156

157157
---
158158

0 commit comments

Comments
 (0)