Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/src/obs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

The `obs` method takes data intended as input to `fit`, `predict` or `transform`, and
transforms it to a learner-specific form guaranteed to implement a form of observation
access designated by the learner. The transformed data can then passed on to the relevant
method in place of the original input (after first resampling it, if the learner supports
this). Using `obs` may provide performance advantages over naive workflows in some cases
(e.g., cross-validation).
access designated by the learner. The transformed data can then be passed on to the
relevant method in place of the original input (after first resampling it, if the learner
supports this). Using `obs` may provide performance advantages over naive workflows in
some cases (e.g., cross-validation).

```julia
obs(learner, data) # can be passed to `fit` instead of `data`
Expand Down
2 changes: 1 addition & 1 deletion docs/src/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ generally requires overloading `Base.==` for the struct.
No LearnAPI.jl method is permitted to mutate a learner. In particular, one should make
copies of RNG hyperparameters before using them in an implementation of
[`fit`](@ref). (Do not make *deep* copies as this leads to wrong behavior in the case
of `Random.default_rng()`, which not an actual RNG but only a pointer to the task-local
of `Random.default_rng()`, which is not an actual RNG but only a pointer to the task-local
default RNG.)


Expand Down
20 changes: 10 additions & 10 deletions src/predict_transform.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ end
DOC_MUTATION(op) =
"""

If [`LearnAPI.is_static(learner)`](@ref) is `true`, then `$op` may mutate it's first
argument (to record byproducts of the computation not naturally part of the return
value) but not in a way that alters the result of a subsequent call to `predict`,
`transform` or `inverse_transform`. See more at [`fit`](@ref).
If [`LearnAPI.kind_of(learner)`](@ref) is `LearnAPI.Static()`(@ref), then `$op` may
mutate it's first argument (to record byproducts of the computation not naturally part
of the return value) but not in a way that alters the result of a subsequent call to
`predict`, `transform` or `inverse_transform`. See more at [`fit`](@ref).

"""

Expand Down Expand Up @@ -83,9 +83,9 @@ See also [`fit`](@ref), [`transform`](@ref), [`inverse_transform`](@ref).

# Extended help

In the special case `LearnAPI.is_static(learner) == true`, it is possible that
`predict(model, ...)` will mutate `model`, but not in a way that affects subsequent
`predict` calls.
In the special case If [`LearnAPI.kind_of(learner)`](@ref) is `LearnAPI.Static()`(@ref),
it is possible that `predict(model, ...)` will mutate `model`, but not in a way that
affects subsequent `predict` calls.

# New implementations

Expand Down Expand Up @@ -151,9 +151,9 @@ or, in one step (where supported):
W = transform(learner, X) # `fit` implied
```

In the special case `LearnAPI.is_static(learner) == true`, it is possible that
`transform(model, ...)` will mutate `model`, but not in a way that affects subsequent
`transform` calls.
In the special case If [`LearnAPI.kind_of(learner)`](@ref) is `LearnAPI.Static()`(@ref),
it is possible that `transform(model, ...)` will mutate `model`, but not in a way that
affects subsequent `transform` calls.

See also [`fit`](@ref), [`predict`](@ref),
[`inverse_transform`](@ref).
Expand Down
Loading