Skip to content

Commit 86ba3d5

Browse files
committed
doc tweaks
1 parent d59c534 commit 86ba3d5

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

docs/src/predict_transform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ transform(model, data...) -> transformed_data
88
inverse_transform(model, data...) -> inverted_data
99
```
1010

11-
Methods consuming output `obsdata` of data-preprocessor [`obs`](@ref):
11+
Methods consuming output, `obsdata`, of data-preprocessor [`obs`](@ref):
1212

1313
```julia
1414
obspredict(model, kind_of_proxy, obsdata) -> prediction

docs/src/traits.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ The following convenience methods are provided but not overloadable by new imple
6969
|:-----------------------------------------------------|:--------------------------------------------------------------------------------------------------------------|:--------|
7070
| `LearnAPI.name(algorithm)` | algorithm type name as string | "PCA" |
7171
| `LearnAPI.is_algorithm(algorithm)` | `true` if `LearnAPI.functions(algorithm)` is not empty | `true` |
72-
| [`LearnAPI.predict_output_scitypes(algorithm)`](@ref) | dictionary of upper bounds on the scitype of predictions, keyed on subtypes of [`LearnAPI.KindOfProxy`](@ref) | |
73-
| [`LearnAPI.predict_output_types(algorithm)`](@ref) | dictionary of upper bounds on the type of predictions, keyed on subtypes of [`LearnAPI.KindOfProxy`](@ref) | |
72+
| [`LearnAPI.predict_output_scitype(algorithm)`](@ref) | dictionary of upper bounds on the scitype of predictions, keyed on subtypes of [`LearnAPI.KindOfProxy`](@ref) | |
73+
| [`LearnAPI.predict_output_type(algorithm)`](@ref) | dictionary of upper bounds on the type of predictions, keyed on subtypes of [`LearnAPI.KindOfProxy`](@ref) | |
7474

7575
## Implementation guide
7676

src/predict_transform.jl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function DOC_IMPLEMENTED_METHODS(name; overloaded=false)
1+
function DOC_IMPLEMENTED_METHODS(name; overloaded=false)
22
word = overloaded ? "overloaded" : "implemented"
33
"If $word, you must include `$name` in the tuple returned by the "*
44
"[`LearnAPI.functions`](@ref) trait. "
@@ -49,8 +49,9 @@ DOC_MINIMIZE(func) =
4949
The first signature returns target or target proxy predictions for input features `data`,
5050
according to some `model` returned by [`fit`](@ref) or [`obsfit`](@ref). Where supported,
5151
these are literally target predictions if `kind_of_proxy = LiteralTarget()`, and
52-
probability density/mass functions if `kind_of_proxy =
53-
Distribution()`. $DOC_HOW_TO_LIST_PROXIES
52+
probability density/mass functions if `kind_of_proxy = Distribution()`. List all options
53+
with [`LearnAPI.kinds_of_proxy(algorithm)`](@ref), where `algorithm =
54+
LearnAPI.algorithm(model)`.
5455
5556
The shortcut `predict(model, data...) = predict(model, LiteralTarget(), data...)` is also
5657
provided.
@@ -135,13 +136,15 @@ where `data...` is what the standard [`predict`](@ref) call expects, as in the c
135136
`predict(model, kind_of_proxy, data...)`. Note `data` is always a tuple, even if `predict`
136137
has only one data argument. See more at [`obs`](@ref).
137138
139+
138140
$(DOC_MUTATION(:obspredict))
139141
140142
If overloaded, you must include both `LearnAPI.obspredict` and `LearnAPI.predict` in the
141143
list of methods returned by the [`LearnAPI.functions`](@ref) trait.
142144
143-
Each supported `kind_of_proxy` should be listed in the return value of the
144-
[`LearnAPI.kinds_of_proxy(algorithm)`](@ref) trait.
145+
An implementation is provided for each kind of target proxy you wish to support. See the
146+
LearnAPI.jl documentation for options. Each supported `kind_of_proxy` instance should be
147+
listed in the return value of the [`LearnAPI.kinds_of_proxy(algorithm)`](@ref) trait.
145148
146149
$(DOC_MINIMIZE(:obspredict))
147150

src/traits.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ functions(::Any) = ()
9191
"""
9292
LearnAPI.kinds_of_proxy(algorithm)
9393
94-
Returns an tuple of instances, `kind`, for which for which `predict(algorithm, kind,
94+
Returns an tuple of all instances, `kind`, for which for which `predict(algorithm, kind,
9595
data...)` has a guaranteed implementation. Each such `kind` subtypes
9696
[`LearnAPI.KindOfProxy`](@ref). Examples are `LiteralTarget()` (for predicting actual
9797
target values) and `Distributions()` (for predicting probability mass/density functions).

0 commit comments

Comments
 (0)