@@ -27,9 +27,9 @@ see [`obs`](@ref) and [`LearnAPI.data_interface`](@ref) for details.
27
27
28
28
!!! note
29
29
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.
33
33
34
34
### [ Hyperparameters] (@id hyperparameters)
35
35
@@ -96,9 +96,9 @@ generally requires overloading `Base.==` for the struct.
96
96
97
97
!!! important
98
98
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).
102
102
103
103
#### Composite learners (wrappers)
104
104
@@ -119,19 +119,19 @@ Below is an example of a learner type with a valid constructor:
119
119
120
120
``` julia
121
121
struct 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
125
125
end
126
126
127
127
"""
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
+
130
130
Instantiate a gradient ridge regressor with the specified hyperparameters.
131
131
132
132
"""
133
133
GradientRidgeRegressor (; learning_rate= 0.01 , epochs= 10 , l2_regularization= 0.01 ) =
134
- GradientRidgeRegressor (learning_rate, epochs, l2_regularization)
134
+ GradientRidgeRegressor (learning_rate, epochs, l2_regularization)
135
135
LearnAPI. constructor (:: GradientRidgeRegressor ) = GradientRidgeRegressor
136
136
```
137
137
@@ -146,9 +146,9 @@ interface.)
146
146
147
147
!!! note "Compulsory methods"
148
148
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).
152
152
153
153
Most learners will also implement [ ` predict ` ] ( @ref ) and/or [ ` transform ` ] ( @ref ) . For a
154
154
minimal (but useless) implementation, see the implementation of ` SmallLearner `
@@ -198,10 +198,14 @@ minimal (but useless) implementation, see the implementation of `SmallLearner`
198
198
199
199
## Utilities
200
200
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
+
201
205
``` @docs
202
- @functions
203
- LearnAPI.clone
206
+ clone
204
207
@trait
208
+ @functions
205
209
```
206
210
207
211
---
0 commit comments