Skip to content

Commit c224ee5

Browse files
committed
augmented_predict -> augmented_transform
1 parent 5ecb557 commit c224ee5

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

src/MLJModelInterface.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export @mlj_model, metadata_pkg, metadata_model
8080
export fit, update, update_data, transform, inverse_transform,
8181
fitted_params, predict, predict_mode, predict_mean, predict_median,
8282
predict_joint, evaluate, clean!, reformat, training_losses,
83-
augmented_predict
83+
augmented_transform
8484

8585
# model traits
8686
for trait in MODEL_TRAITS

src/model_api.jl

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -108,27 +108,6 @@ called on user-specified data.
108108
"""
109109
function predict end
110110

111-
"""
112-
augmented_predict
113-
114-
If implemented, the same as `predict`, but with a return value
115-
augmented by the `predict`ion of the training data.
116-
117-
For example, if implemented for a `Supervised` model with a
118-
`predict` method, `augmented_predict(model, fitresult, Xnew)` will
119-
return
120-
121-
```julia
122-
(predict(model, fitresult, X), predict(model, fitresult, Xnew))
123-
```
124-
125-
where `(X, y)` was the training data.
126-
127-
Must be implemented by any `UnsupervisedDetector` or `SupervisedDetector`.
128-
129-
"""
130-
function augmented_predict end
131-
132111
"""
133112
134113
Models types `M` for which `prediction_type(M) == :probablisitic` may
@@ -171,6 +150,27 @@ function transform end
171150
"""
172151
function inverse_transform end
173152

153+
"""
154+
augmented_transform
155+
156+
If implemented, the same as `transform`, but with a return value
157+
augmented by the `transform`ation of the training data.
158+
159+
For example, for if implemented for a `Supervised` model with a
160+
`transform` method, the return value of `transform_transform(model,
161+
fitresult, Xnew)` coincides with
162+
163+
```julia
164+
(transform(model, fitresult, X), transform(model, fitresult, Xnew))
165+
```
166+
167+
where `(X, y)` was the training data.
168+
169+
Must be implemented by any `UnsupervisedDetector` or `SupervisedDetector`.
170+
171+
"""
172+
function augmented_transform end
173+
174174
# models can optionally overload these for enable serialization in a
175175
# custom format:
176176
function save end

0 commit comments

Comments
 (0)