diff --git a/docs/src/obs.md b/docs/src/obs.md index c36f4e3..d879b9e 100644 --- a/docs/src/obs.md +++ b/docs/src/obs.md @@ -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` diff --git a/docs/src/reference.md b/docs/src/reference.md index acc5cd2..bc030cd 100644 --- a/docs/src/reference.md +++ b/docs/src/reference.md @@ -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.) diff --git a/src/predict_transform.jl b/src/predict_transform.jl index f097a97..b33ac25 100644 --- a/src/predict_transform.jl +++ b/src/predict_transform.jl @@ -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). """ @@ -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 @@ -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).