Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
LearnAPI = "92ad9a40-7767-427a-9ee6-6e577f1266cb"
LearnTestAPI = "3111ed91-c4f2-40e7-bb19-7f6c618409b8"
MLCore = "c2834f40-e789-41da-a90e-33b280584a8c"
ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
Expand Down
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
using Documenter
using LearnAPI
using LearnTestAPI
using ScientificTypesBase
using DocumenterInterLinks
# using LearnTestAPI

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

makedocs(
modules=[LearnAPI, ], #LearnTestAPI],
modules=[LearnAPI, LearnTestAPI],
format=Documenter.HTML(
prettyurls = true,#get(ENV, "CI", nothing) == "true",
collapselevel = 1,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/anatomy_of_an_implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ refer to the [demonstration](@ref workflow) of the implementation given later.
1. Implement `fit` (probably following an existing example). Read the [`fit`](@ref) document string to see what else may need to be implemented, paying particular attention to the "New implementations" section.
3. Rinse and repeat with each new method implemented.
4. Identify any additional [learner traits](@ref traits) that have appropriate overloadings; use the [`@trait`](@ref) macro to define these in one block.
5. Ensure your implementation includes the compulsory method [`LearnAPI.learner`](@ref) and compulsory traits [`LearnAPI.constructor`](@ref) and [`LearnAPI.functions`](@ref). Read and apply "[Testing your implementation](@ref)".
5. Ensure your implementation includes the compulsory method [`LearnAPI.learner`](@ref) and compulsory traits [`LearnAPI.constructor`](@ref) and [`LearnAPI.functions`](@ref). Read and apply "[Testing an Implementation](@ref)".

If you get stuck, refer back to this tutorial and the [Reference](@ref reference) sections.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/common_implementation_patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ which introduces the main interface objects and terminology.
Although an implementation is defined purely by the methods and traits it implements, many
implementations fall into one (or more) of the informally understood patterns or tasks
below. While some generally fall into one of the core `Descriminative`, `Generative` or
`Static` patterns detailed [here](@id kinds_of_learner), there are exceptions (such as
`Static` patterns detailed [here](@ref kinds_of_learner), there are exceptions (such as
clustering, which has both `Descriminative` and `Static` variations).

- [Regression](@ref): Supervised learners for continuous targets
Expand Down
91 changes: 51 additions & 40 deletions docs/src/testing_an_implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,67 @@

Testing is provided by the LearnTestAPI.jl package.

<!-- Testing is provided by the LearnTestAPI.jl package documented below. -->
Testing is provided by the LearnTestAPI.jl package documented below.

<!-- ## Quick start -->
## Quick start

<!-- ```@docs -->
<!-- LearnTestAPI -->
<!-- ``` -->
```@docs
LearnTestAPI
```

<!-- !!! warning -->
!!! warning

<!-- New releases of LearnTestAPI.jl may add tests to `@testapi`, and -->
<!-- this may result in new failures in client package test suites, because -->
<!-- of previously undetected broken contracts. Adding a test to `@testapi` -->
<!-- is not considered a breaking change -->
<!-- to LearnTestAPI, unless it supports a breaking change to LearnAPI.jl. -->
New releases of LearnTestAPI.jl may add tests to `@testapi`, and
this may result in new failures in client package test suites, because
of previously undetected broken contracts. Adding a test to `@testapi`
is not considered a breaking change
to LearnTestAPI, unless it supports a breaking change to LearnAPI.jl.


<!-- ## The @testapi macro -->
## The @testapi macro

<!-- ```@docs -->
<!-- LearnTestAPI.@testapi -->
<!-- ``` -->
```@docs
LearnTestAPI.@testapi
```

<!-- ## Learners for testing -->
## Learners for testing

<!-- LearnTestAPI.jl provides some simple, tested, LearnAPI.jl implementations, which may be -->
<!-- useful for testing learner wrappers and meta-algorithms. -->
LearnTestAPI.jl provides some simple, tested, LearnAPI.jl implementations, which may be
useful for testing learner wrappers and meta-algorithms.

<!-- ```@docs -->
<!-- LearnTestAPI.Ridge -->
<!-- LearnTestAPI.BabyRidge -->
<!-- LearnTestAPI.ConstantClassifier -->
<!-- LearnTestAPI.TruncatedSVD -->
<!-- LearnTestAPI.Selector -->
<!-- LearnTestAPI.FancySelector -->
<!-- LearnTestAPI.NormalEstimator -->
<!-- LearnTestAPI.Ensemble -->
<!-- LearnTestAPI.StumpRegressor -->
<!-- ``` -->
- [`LearnTestAPI.Ridge`](@ref)
- [`LearnTestAPI.BabyRidge`](@ref)
- [`LearnTestAPI.ConstantClassifier`](@ref)
- [`LearnTestAPI.TruncatedSVD`](@ref)
- [`LearnTestAPI.Selector`](@ref)
- [`LearnTestAPI.FancySelector`](@ref)
- [`LearnTestAPI.NormalEstimator`](@ref)
- [`LearnTestAPI.Ensemble`](@ref)
- [`LearnTestAPI.StumpRegressor`](@ref)

<!-- ## Private methods -->

<!-- For LearnTestAPI.jl developers only, and subject to breaking changes at any time: -->
```@docs
LearnTestAPI.Ridge
LearnTestAPI.BabyRidge
LearnTestAPI.ConstantClassifier
LearnTestAPI.TruncatedSVD
LearnTestAPI.Selector
LearnTestAPI.FancySelector
LearnTestAPI.NormalEstimator
LearnTestAPI.Ensemble
LearnTestAPI.StumpRegressor
```

<!-- ```@docs -->
<!-- LearnTestAPI.@logged_testset -->
<!-- LearnTestAPI.@nearly -->
<!-- LearnTestAPI.isnear -->
<!-- LearnTestAPI.learner_get -->
<!-- LearnTestAPI.model_get -->
<!-- LearnTestAPI.verb -->
<!-- LearnTestAPI.filter_out_verbosity -->
<!-- ``` -->
## Private methods

For LearnTestAPI.jl developers only, and subject to breaking changes at any time:

```@docs
LearnTestAPI.@logged_testset
LearnTestAPI.@nearly
LearnTestAPI.isnear
LearnTestAPI.learner_get
LearnTestAPI.model_get
LearnTestAPI.verb
LearnTestAPI.filter_out_verbosity
```
2 changes: 1 addition & 1 deletion src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ following must hold:
- The ``j``th observation of `ŷ`, for any ``j``, depends only on the ``j``th
observation of the provided `data` (no correlation between observations).

An exception holds in the case that [`LearnAPI.kind_of(learner)`](@ref)` ==
An exception holds in the case that [`LearnAPI.kind_of(learner)`](@ref)` == `
[`LearnAPI.Generative()`](@ref):

- `LearnAPI.predict(model, kind_of_proxy)` consists of a single observation (such as a
Expand Down
Loading