11# # FIT
22
33"""
4- fit(learner, data; verbosity=1 )
5- fit(learner; verbosity=1 )
4+ fit(learner, data; verbosity=LearnAPI.default_verbosity() )
5+ fit(learner; verbosity=LearnAPI.default_verbosity()) )
66
77In the case of the first signature, execute the machine learning or statistical algorithm
88with configuration `learner` using the provided training `data`, returning an object,
@@ -51,7 +51,8 @@ Implementation of exactly one of the signatures is compulsory. Unless implementi
5151[`LearnAPI.Descriminative()`](@ref) `fit`/`predict`/`transform` pattern,
5252[`LearnAPI.kind_of(learner)`](@ref) will need to be suitably overloaded.
5353
54- The `fit` signature must include `verbosity` with `1` as default.
54+ The `fit` signature must include the keyword argument `verbosity` with
55+ `LearnAPI.default_verbosity()` as default.
5556
5657The LearnAPI.jl specification has nothing to say regarding `fit` signatures with more than
5758two arguments. For convenience, for example, an implementation is free to implement a
@@ -74,7 +75,7 @@ function fit end
7475# # UPDATE AND COUSINS
7576
7677"""
77- update(model, data, param_replacements...; verbosity=1 )
78+ update(model, data, param_replacements...; verbosity=LearnAPI.default_verbosity() )
7879
7980Return an updated version of the `model` object returned by a previous [`fit`](@ref) or
8081`update` call, but with the specified hyperparameter replacements, in the form `:p1 =>
@@ -104,9 +105,10 @@ See also [`fit`](@ref), [`update_observations`](@ref), [`update_features`](@ref)
104105
105106# New implementations
106107
107- Implementation is optional. The signature must include `verbosity`. It should be true that
108- `LearnAPI.learner(newmodel) == newlearner`, where `newmodel` is the return value and
109- `newlearner = LearnAPI.clone(learner, replacements...)`.
108+ Implementation is optional. The signature must include the `verbosity` keyword
109+ argument. It should be true that `LearnAPI.learner(newmodel) == newlearner`, where
110+ `newmodel` is the return value and `newlearner = LearnAPI.clone(learner,
111+ replacements...)`.
110112
111113Cannot be implemented if [`LearnAPI.kind_of(learner)`](@ref)` == `LearnAPI.Static()`.
112114
@@ -118,10 +120,15 @@ See also [`LearnAPI.clone`](@ref)
118120function update end
119121
120122"""
121- update_observations(model, new_data, param_replacements...; verbosity=1)
123+ update_observations(
124+ model,
125+ new_data,
126+ param_replacements...;
127+ verbosity=LearnAPI.default_verbosity(),
128+ )
122129
123130Return an updated version of the `model` object returned by a previous [`fit`](@ref) or
124- `update` call given the new observations present in `new_data`. One may additionally
131+ `update` call, given the new observations present in `new_data`. One may additionally
125132specify hyperparameter replacements in the form `:p1 => value1, :p2 => value2, ...`.
126133
127134```julia-repl
@@ -145,9 +152,10 @@ See also [`fit`](@ref), [`update`](@ref), [`update_features`](@ref).
145152
146153# New implementations
147154
148- Implementation is optional. The signature must include `verbosity`. It should be true that
149- `LearnAPI.learner(newmodel) == newlearner`, where `newmodel` is the return value and
150- `newlearner = LearnAPI.clone(learner, replacements...)`.
155+ Implementation is optional. The signature must include the `verbosity` keyword
156+ argument. It should be true that `LearnAPI.learner(newmodel) == newlearner`, where
157+ `newmodel` is the return value and `newlearner = LearnAPI.clone(learner,
158+ replacements...)`.
151159
152160Cannot be implemented if [`LearnAPI.kind_of(learner)`](@ref)` == `LearnAPI.Static()`.
153161
@@ -159,7 +167,11 @@ See also [`LearnAPI.clone`](@ref).
159167function update_observations end
160168
161169"""
162- update_features(model, new_data, param_replacements...; verbosity=1)
170+ update_features(
171+ model,
172+ new_data,
173+ param_replacements,...;
174+ verbosity=LearnAPI.default_verbosity(),
163175 )
164176
165177Return an updated version of the `model` object returned by a previous [`fit`](@ref) or
@@ -177,9 +189,10 @@ See also [`fit`](@ref), [`update`](@ref), [`update_features`](@ref).
177189
178190# New implementations
179191
180- Implementation is optional. The signature must include `verbosity`. It should be true that
181- `LearnAPI.learner(newmodel) == newlearner`, where `newmodel` is the return value and
182- `newlearner = LearnAPI.clone(learner, replacements...)`.
192+ Implementation is optional. The signature must include the `verbosity` keyword
193+ argument. It should be true that `LearnAPI.learner(newmodel) == newlearner`, where
194+ `newmodel` is the return value and `newlearner = LearnAPI.clone(learner,
195+ replacements...)`.
183196
184197Cannot be implemented if [`LearnAPI.kind_of(learner)`](@ref)` == `LearnAPI.Static()`.
185198
0 commit comments