@@ -27,9 +27,9 @@ see [`obs`](@ref) and [`LearnAPI.data_interface`](@ref) for details.
2727
2828!!! note
2929
30- In the MLUtils.jl
31- convention, observations in tables are the rows but observations in a matrix are the
32- columns.
30+ In the MLUtils.jl
31+ convention, observations in tables are the rows but observations in a matrix are the
32+ columns.
3333
3434### [Hyperparameters](@id hyperparameters)
3535
@@ -96,9 +96,9 @@ generally requires overloading `Base.==` for the struct.
9696
9797!!! important
9898
99- No LearnAPI.jl method is permitted to mutate a learner. In particular, one should make
100- deep copies of RNG hyperparameters before using them in a new implementation of
101- [`fit`](@ref).
99+ No LearnAPI.jl method is permitted to mutate a learner. In particular, one should make
100+ deep copies of RNG hyperparameters before using them in a new implementation of
101+ [`fit`](@ref).
102102
103103#### Composite learners (wrappers)
104104
@@ -119,19 +119,19 @@ Below is an example of a learner type with a valid constructor:
119119
120120```julia
121121struct GradientRidgeRegressor{T<:Real}
122- learning_rate::T
123- epochs::Int
124- l2_regularization::T
122+ learning_rate::T
123+ epochs::Int
124+ l2_regularization::T
125125end
126126
127127"""
128- GradientRidgeRegressor(; learning_rate=0.01, epochs=10, l2_regularization=0.01)
129-
128+ GradientRidgeRegressor(; learning_rate=0.01, epochs=10, l2_regularization=0.01)
129+
130130Instantiate a gradient ridge regressor with the specified hyperparameters.
131131
132132"""
133133GradientRidgeRegressor(; learning_rate=0.01, epochs=10, l2_regularization=0.01) =
134- GradientRidgeRegressor(learning_rate, epochs, l2_regularization)
134+ GradientRidgeRegressor(learning_rate, epochs, l2_regularization)
135135LearnAPI.constructor(::GradientRidgeRegressor) = GradientRidgeRegressor
136136```
137137
@@ -146,9 +146,9 @@ interface.)
146146
147147!!! note "Compulsory methods"
148148
149- All new learner types must implement [`fit`](@ref),
150- [`LearnAPI.learner`](@ref), [`LearnAPI.constructor`](@ref) and
151- [`LearnAPI.functions`](@ref).
149+ All new learner types must implement [`fit`](@ref),
150+ [`LearnAPI.learner`](@ref), [`LearnAPI.constructor`](@ref) and
151+ [`LearnAPI.functions`](@ref).
152152
153153Most learners will also implement [`predict`](@ref) and/or [`transform`](@ref). For a
154154minimal (but useless) implementation, see the implementation of `SmallLearner`
@@ -198,10 +198,14 @@ minimal (but useless) implementation, see the implementation of `SmallLearner`
198198
199199## Utilities
200200
201+ - [`clone`](@ref): for cloning a learner with specified hyperparameter replacements.
202+ - [`@trait`](@ref): for simultaneously declaring multiple traits
203+ - [`@functions`](@ref): for listing functions available for use with a learner
204+
201205```@docs
202- @functions
203- LearnAPI.clone
206+ clone
204207@trait
208+ @functions
205209```
206210
207211---
0 commit comments