@@ -84,24 +84,29 @@ dimension using distances from the cluster centres.
84
84
85
85
### [ One-liners combining fit and transform/predict] (@id one_liners)
86
86
87
- Learners may optionally overload ` transform ` to apply ` fit ` first, using the supplied
88
- data if required, and then immediately ` transform ` the same data. The same applies to
89
- ` predict ` . In that case the first argument of ` transform ` /` predict ` is an * learner*
90
- instead of the output of ` fit ` :
87
+ Learners may additionally overload ` transform ` to apply ` fit ` first, using the supplied
88
+ data if required, and then immediately ` transform ` the same data. In that case the first
89
+ argument of ` transform ` is an * learner* instead of the output of ` fit ` :
91
90
92
91
``` julia
93
- predict (learner, kind_of_proxy, data) # `fit` implied
94
92
transform (learner, data) # `fit` implied
95
93
```
96
94
97
- For example, if ` fit(learner, X) ` is defined, then ` predict(learner, X) ` will be
98
- shorthand for
95
+ This will be shorthand for
99
96
100
97
``` julia
101
- model = fit (learner, X)
102
- predict (model, X)
98
+ model = fit (learner, X) # or `fit(learner)` in the static case
99
+ transform (model, X)
100
+ ```
101
+
102
+ The same remarks apply to ` predict ` , as in
103
+
104
+ ``` julia
105
+ predict (learner, kind_of_proxy, data) # `fit` implied
103
106
```
104
107
108
+ LearnAPI.jl does not, however, guarantee the provision of these one-liners.
109
+
105
110
## [ Reference] (@id predict_ref)
106
111
107
112
``` @docs
0 commit comments