Skip to content

Commit a0f8934

Browse files
committed
clarify alternative data patterns in "anatomy of an interface"
1 parent dd0799e commit a0f8934

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/src/anatomy_of_an_implementation.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ the docstring to the *constructor*, not the struct.
7676
## Implementing `fit`
7777

7878
A ridge regressor requires two types of data for training: input features `X`, which here
79-
we suppose are tabular¹, and a [target](@ref proxy) `y`, which we suppose is a vector.
79+
we suppose are tabular¹, and a [target](@ref proxy) `y`, which we suppose is a vector.
8080

8181
It is convenient to define a new type for the `fit` output, which will include
8282
coefficients labelled by feature name for inspection after training:
@@ -501,3 +501,9 @@ like the native ones, they must be included in the [`LearnAPI.functions`](@ref)
501501
declaration.
502502

503503
³ The last index must be the observation index.
504+
505+
⁴ The `data = (X, y)` pattern implemented here is not only supported pattern. For,
506+
example, `data` might be a single table containing both features and target variable. In
507+
this case, it will be necessary to overload [`LearnAPI.features`](@ref) in addition to
508+
[`LearnAPI.target`](@ref); the name of the target column would need to be a hyperparameter
509+
or `fit` keyword argument.

0 commit comments

Comments
 (0)