@@ -9,12 +9,13 @@ A base Julia interface for machine learning and statistics </span>
9
9
<br>
10
10
```
11
11
12
- LearnAPI.jl is a lightweight, functional-style interface, providing a
13
- collection of [ methods] (@ref Methods), such as ` fit ` and ` predict ` , to be implemented by
14
- algorithms from machine learning and statistics. Through such implementations, these
15
- algorithms buy into functionality, such as hyperparameter optimization and model
16
- composition, as provided by ML/statistics toolboxes and other packages. LearnAPI.jl also
17
- provides a number of Julia [ traits] (@ref traits) for promising specific behavior.
12
+ LearnAPI.jl is a lightweight, functional-style interface, providing a collection of
13
+ [ methods] (@ref Methods), such as ` fit ` and ` predict ` , to be implemented by algorithms from
14
+ machine learning and statistics. Its careful design ensures algorithms implementing
15
+ LearnAPI.jl can buy into functionality, such as external performance estimates,
16
+ hyperparameter optimization and model composition, provided by ML/statistics toolboxes and
17
+ other packages. LearnAPI.jl includes a number of Julia [ traits] (@ref traits) for promising
18
+ specific behavior.
18
19
19
20
LearnAPI.jl's only dependency is the standard library ` InteractiveUtils ` .
20
21
@@ -91,6 +92,18 @@ then overloading `obs` is completely optional. Plain iteration interfaces, with
91
92
knowledge of the number of observations, can also be specified (to support, e.g., data
92
93
loaders reading images from disk).
93
94
95
+ ## Hooks for adding functionality
96
+
97
+ A key to enabling toolboxes to enhance LearnAPI.jl algorithm functionality is the
98
+ implementation of two key additional methods, beyond the usual ` fit ` and
99
+ ` predict ` /` transform ` . Given any training ` data ` consumed by ` fit ` (such as `data = (X,
100
+ y)` in the example above) [ ` LearnAPI.features(algorithm, data)`] (@ref input) tells us what
101
+ part of ` data ` comprises * features* , which is something that can be passsed onto to
102
+ ` predict ` or ` transform ` (` X ` in the example) while [ `LearnAPI.target(algorithm,
103
+ data)` ](@ref), if implemented, tells us what part comprises the target ( ` y` in the
104
+ example). By explicitly requiring such methods, we free algorithms to consume data in
105
+ multiple forms, including optimised, algorithm-specific forms, as described above.
106
+
94
107
## Learning more
95
108
96
109
- [ Anatomy of an Implementation] ( @ref ) : informal introduction to the main actors in a new
0 commit comments