Skip to content

Commit f2d4df8

Browse files
authored
Merge pull request #30 from JuliaAI/simplification
Major revision to simplify; in particular, to remove `obsfit`, `obspredict`, `obstransform`
2 parents b53d2fd + e25e4e7 commit f2d4df8

33 files changed

+1804
-1642
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
version:
20-
- '1.6'
20+
- '1.6' # previous LTS release
21+
- '1.10' # new LTS release
2122
- '1' # automatically expands to the latest stable 1.x release of Julia.
2223
os:
2324
- ubuntu-latest
@@ -65,4 +66,4 @@ jobs:
6566
using Documenter: DocMeta, doctest
6667
using LearnAPI
6768
DocMeta.setdocmeta!(LearnAPI, :DocTestSetup, :(using LearnAPI); recursive=true)
68-
doctest(LearnAPI)'
69+
doctest(LearnAPI)'

Project.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
1414
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1515
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
1616
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
17-
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1817
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
1918
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2019

2120
[targets]
22-
test = ["DataFrames", "LinearAlgebra", "MLUtils", "Serialization", "SparseArrays", "Tables", "Test"]
21+
test = ["DataFrames", "LinearAlgebra", "MLUtils", "Serialization", "Tables", "Test"]

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
LearnAPI = "92ad9a40-7767-427a-9ee6-6e577f1266cb"
34
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
45
ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161"
56
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"

docs/make.jl

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,24 @@ const REPO = Remotes.GitHub("JuliaAI", "LearnAPI.jl")
66

77
makedocs(
88
modules=[LearnAPI,],
9-
format=Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
9+
format=Documenter.HTML(
10+
prettyurls = get(ENV, "CI", nothing) == "true",
11+
collapselevel = 1,
12+
),
1013
pages=[
1114
"Home" => "index.md",
1215
"Anatomy of an Implementation" => "anatomy_of_an_implementation.md",
13-
"Reference" => "reference.md",
14-
"Kinds of Target Proxy" => "kinds_of_target_proxy.md",
15-
"fit" => "fit.md",
16-
"predict, transform, and relatives" => "predict_transform.md",
17-
"minimize" => "minimize.md",
18-
"obs" => "obs.md",
19-
"Accessor Functions" => "accessor_functions.md",
20-
"Algorithm Traits" => "traits.md",
16+
"Reference" => [
17+
"Overview" => "reference.md",
18+
"fit/update" => "fit_update.md",
19+
"predict/transform" => "predict_transform.md",
20+
"Kinds of Target Proxy" => "kinds_of_target_proxy.md",
21+
"minimize" => "minimize.md",
22+
"target/weights/features" => "target_weights_features.md",
23+
"obs" => "obs.md",
24+
"Accessor Functions" => "accessor_functions.md",
25+
"Algorithm Traits" => "traits.md",
26+
],
2127
"Common Implementation Patterns" => "common_implementation_patterns.md",
2228
"Testing an Implementation" => "testing_an_implementation.md",
2329
],

docs/src/accessor_functions.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# [Accessor Functions](@id accessor_functions)
22

3-
The sole argument of an accessor function is the output, `model`, of [`fit`](@ref) or
4-
[`obsfit`](@ref).
3+
The sole argument of an accessor function is the output, `model`, of
4+
[`fit`](@ref). Algorithms are free to implement any number of these, or none of them.
55

66
- [`LearnAPI.algorithm(model)`](@ref)
77
- [`LearnAPI.extras(model)`](@ref)
@@ -12,9 +12,13 @@ The sole argument of an accessor function is the output, `model`, of [`fit`](@re
1212
- [`LearnAPI.feature_importances(model)`](@ref)
1313
- [`LearnAPI.training_labels(model)`](@ref)
1414
- [`LearnAPI.training_losses(model)`](@ref)
15+
- [`LearnAPI.training_predictions(model)`](@ref)
1516
- [`LearnAPI.training_scores(model)`](@ref)
1617
- [`LearnAPI.components(model)`](@ref)
1718

19+
Algorithm-specific accessor functions may also be implemented. The names of all accessor
20+
functions are included in the list returned by [`LearnAPI.functions(algorithm)`](@ref).
21+
1822
## Implementation guide
1923

2024
All new implementations must implement [`LearnAPI.algorithm`](@ref). While, all others are
@@ -33,6 +37,7 @@ LearnAPI.tree
3337
LearnAPI.trees
3438
LearnAPI.feature_importances
3539
LearnAPI.training_losses
40+
LearnAPI.training_predictions
3641
LearnAPI.training_scores
3742
LearnAPI.training_labels
3843
LearnAPI.components

0 commit comments

Comments
 (0)