Skip to content

Commit d1f3259

Browse files
committed
teak target_observation_scitype
1 parent 1a92f47 commit d1f3259

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/traits.jl

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -464,21 +464,25 @@ fit_observation_type(::Any) = Union{}
464464
"""
465465
LearnAPI.target_observation_scitype(algorithm)
466466
467-
Return an upper bound `S` on the scitype of each observation of `LearnAPI.target(data)`,
468-
where `data` is an admissible argument in the call `fit(algorithm, data)`.
467+
Return an upper bound `S` on the scitype of each observation of an applicable target
468+
variable. Specifically:
469469
470-
This interpretation only holds if `LearnAPI.target(algorithm)` is `true`. In any case,
471-
however, if `algorithm` implements `predict`, then `S` will always be an
472-
upper bound on the scitype of observations that could be conceivably extracted from the
473-
output of [`predict`](@ref). For example, suppose we have
470+
- If `:(LearnAPI.target) in LearnAPI.functions(algorithm)` (i.e., `fit` consumes target
471+
variables) then "target" means anything returned by `LearnAPI.target(algorithm, data)`,
472+
where `data` is an admissible argument in the call `fit(algorithm, data)`.
473+
474+
- `S` will always be an upper bound on the scitype of observations that could be
475+
conceivably extracted from the output of [`predict`](@ref).
476+
477+
To illustate the second case, suppose we have
474478
475479
```julia
476480
model = fit(algorithm, data)
477481
ŷ = predict(model, Sampleable(), data_new)
478482
```
479483
480-
Then each sample generated by each "observation" of `ŷ` (a vector of sampleable objects,
481-
say) will be bound in scitype by `S`.
484+
Then each individual sample generated by each "observation" of `ŷ` (a vector of sampleable
485+
objects, say) will be bound in scitype by `S`.
482486
483487
See also See also [`LearnAPI.fit_observation_scitype`](@ref).
484488

0 commit comments

Comments
 (0)