Skip to content

Commit 484de7b

Browse files
committed
Integrate documentation for LearnTestAPI
1 parent bdda1b0 commit 484de7b

File tree

4 files changed

+62
-9
lines changed

4 files changed

+62
-9
lines changed

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
44
LearnAPI = "92ad9a40-7767-427a-9ee6-6e577f1266cb"
5+
LearnTestAPI = "3111ed91-c4f2-40e7-bb19-7f6c618409b8"
56
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
67
ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161"
78
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"

docs/make.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ using Documenter
22
using LearnAPI
33
using ScientificTypesBase
44
using DocumenterInterLinks
5+
using LearnTestAPI
56

67
const REPO = Remotes.GitHub("JuliaAI", "LearnAPI.jl")
78

89
makedocs(
9-
modules=[LearnAPI,],
10+
modules=[LearnAPI, LearnTestAPI],
1011
format=Documenter.HTML(
1112
prettyurls = true,#get(ENV, "CI", nothing) == "true",
1213
collapselevel = 1,

docs/src/index.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,13 @@ appear as an input to training but not to prediction.
8484
## Data interfaces
8585

8686
Algorithms are free to consume data in any format. However, a method called [`obs`](@ref
87-
data_interface) (read as "observations") gives users and meta-algorithms access to an
88-
algorithm-specific representation of input data, which is also guaranteed to implement a
89-
standard interface for accessing individual observations, unless the algorithm explicitly
90-
opts out. Moreover, the `fit` and `predict` methods will also be able to consume these
91-
alternative data representations, for performance benefits in some situations.
87+
data_interface) (read as "observations") gives developers the option of providing a
88+
separate data front end for their algorithms. In this case `obs` gives users and
89+
meta-algorithms access to an algorithm-specific representation of input data, which is
90+
also guaranteed to implement a standard interface for accessing individual observations,
91+
unless the algorithm explicitly opts out. Moreover, the `fit` and `predict` methods will
92+
also be able to consume these alternative data representations, for performance benefits
93+
in some situations.
9294

9395
The fallback data interface is the [MLUtils.jl](https://github.com/JuliaML/MLUtils.jl)
9496
`getobs/numobs` interface, here tagged as [`LearnAPI.RandomAccess()`](@ref), and if the
@@ -97,6 +99,9 @@ then overloading `obs` is completely optional. Plain iteration interfaces, with
9799
knowledge of the number of observations, can also be specified, to support, e.g., data
98100
loaders reading images from disk.
99101

102+
Some canned data front ends are provided by the
103+
[LearnDataFrontEnds.jl](https://juliaai.github.io/LearnAPI.jl/stable/) package.
104+
100105
## Learning more
101106

102107
- [Anatomy of an Implementation](@ref): informal introduction to the main actors in a new
Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,55 @@
11
# Testing an Implementation
22

3-
```@raw html
4-
🚧
3+
Testing is provided by the LearnTestAPI.jl package documented below.
4+
5+
## Quick start
6+
7+
```@docs
8+
LearnTestAPI
59
```
610

11+
LearnAPI.jl and LearnTestAPI.jl have synchronized releases. For example, LearnTestAPI.jl
12+
version 0.2.3 will generally support all LearnAPI.jl versions 0.2.*.
13+
714
!!! warning
815

9-
Under construction
16+
New releases of LearnTestAPI.jl may add tests to `@testapi`, and this may result in
17+
new failures in client package test suites. Nevertheless, adding a test to `@testapi`
18+
is not considered a breaking change to LearnTestAPI, unless the addition supports a
19+
breaking release of LearnAPI.jl.
20+
21+
22+
## The @testapi macro
23+
24+
```@docs
25+
LearnTestAPI.@testapi
26+
```
27+
28+
## Learners for testing
29+
30+
LearnTestAPI.jl provides some simple, tested, LearnAPI.jl implementations, which may be
31+
useful for testing learner wrappers and meta-algorithms.
32+
33+
```@docs
34+
LearnTestAPI.Ridge
35+
LearnTestAPI.BabyRidge
36+
LearnTestAPI.TruncatedSVD
37+
LearnTestAPI.Selector
38+
LearnTestAPI.FancySelector
39+
LearnTestAPI.NormalEstimator
40+
LearnTestAPI.Ensemble
41+
```
42+
43+
## Private methods
44+
45+
For LearnTestAPI.jl developers only, and subject to breaking changes:
46+
47+
```@docs
48+
LearnTestAPI.@logged_testset
49+
LearnTestAPI.@nearly
50+
LearnTestAPI.isnear
51+
LearnTestAPI.learner_get
52+
LearnTestAPI.model_get
53+
LearnTestAPI.verb
54+
LearnTestAPI.filter_out_verbosity
55+
```

0 commit comments

Comments
 (0)