1
- # every model interface must implement a `fit` method of the form
2
- # `fit(model, verb::Integer, training_args...) -> fitresult, cache, report`
1
+ """
2
+ every model interface must implement a `fit` method of the form
3
+ `fit(model, verb::Integer, training_args...) -> fitresult, cache, report`
4
+ """
3
5
function fit end
4
6
5
7
# fallback for static transformations
@@ -12,29 +14,52 @@ fit(m::Supervised, verb::Integer, X, y, w) = fit(m, verb, X, y)
12
14
# fitted parameters (eg, coeficients of linear model):
13
15
fitted_params (:: Model , fitres) = (fitresult= fitres,)
14
16
15
- # each model interface may overload the following refitting method:
17
+ """
18
+ each model interface may overload the `update` refitting method
19
+ """
16
20
update (m:: Model , verb:: Integer , fitres, cache, a... ) = fit (m, verb, a... )
17
21
18
- # stub for online learning method update method
22
+ """
23
+ each model interface may overload the `update_data` refitting method for online learning
24
+ """
19
25
function update_data end
20
26
21
- # supervised methods must implement the predict operation; additionally,
22
- # probabilistic supervised models may overload one or more of
23
- # `predict_mode`, `predict_median` and `predict_mean`
27
+ """
28
+ supervised methods must implement the `predict` operation
29
+ """
24
30
function predict end
31
+
32
+ """
33
+ probabilistic supervised models may overload `predict_mean`
34
+ """
25
35
function predict_mean end
36
+
37
+ """
38
+ probabilistic supervised models may overload `predict_mode`
39
+ """
26
40
function predict_mode end
41
+
42
+ """
43
+ probabilistic supervised models may overload `predict_median`
44
+ """
27
45
function predict_median end
28
46
29
- # unsupervised methods must implement the transform operation and
30
- # may implement the inverse_transform operation
47
+ """
48
+ unsupervised methods must implement the `transform` operation
49
+ """
31
50
function transform end
51
+
52
+ """
53
+ unsupervised methods may implement the `inverse_transform` operation
54
+ """
32
55
function inverse_transform end
33
56
34
57
# models can optionally overload these for enable serialization in a
35
58
# custom format:
36
59
function save end
37
60
function restore end
38
61
39
- # operations implemented by some meta-models:
62
+ """
63
+ some meta-models may choose to implement the `evaluate` operations
64
+ """
40
65
function evaluate end
0 commit comments