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
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- [x] regression
- [ ] classification
- [ ] clustering
- [ ] gradient descent
- [x] gradient descent
- [x] iterative algorithms
- [ ] incremental algorithms
- [ ] dimension reduction
Expand Down
4 changes: 2 additions & 2 deletions docs/src/common_implementation_patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ implementations fall into one (or more) of the following informally understood p

- [Regression](@ref): Supervised learners for continuous targets

- Classification: Supervised learners for categorical targets
- [Classification](@ref): Supervised learners for categorical targets

- Clusterering: Algorithms that group data into clusters for classification and
possibly dimension reduction. May be true learners (generalize to new data) or static.

- Gradient Descent: Including neural networks.
- [Gradient Descent](@ref): Including neural networks.

- [Iterative Algorithms](@ref)

Expand Down
4 changes: 4 additions & 0 deletions docs/src/patterns/classification.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Classification

See these examples from tests:

- [perceptron classifier](https://github.com/JuliaAI/LearnAPI.jl/blob/dev/test/integration/gradient_descent.jl)
5 changes: 5 additions & 0 deletions docs/src/patterns/gradient_descent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Gradient Descent

See [this
example](https://github.com/JuliaAI/LearnAPI.jl/blob/dev/test/integration/gradient_descent.jl)
from tests.
8 changes: 5 additions & 3 deletions docs/src/patterns/iterative_algorithms.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Iterative Algorithms

See [this
example](https://github.com/JuliaAI/LearnAPI.jl/blob/dev/test/integration/ensembling.jl)
from tests.
See these examples from tests:

- [bagged ensembling](https://github.com/JuliaAI/LearnAPI.jl/blob/dev/test/integration/ensembling.jl)

- [perceptron classifier](https://github.com/JuliaAI/LearnAPI.jl/blob/dev/test/integration/gradient_descent.jl)
11 changes: 6 additions & 5 deletions test/integration/ensembling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,14 @@ Xtest = Tables.subset(X, test)
ŷ7 = predict(model, Xtest)

# compare with cold restart:
model = fit(LearnAPI.clone(algorithm; n=7), Xtrain, y[train]; verbosity=0);
@test ŷ7 ≈ predict(model, Xtest)
model_cold = fit(LearnAPI.clone(algorithm; n=7), Xtrain, y[train]; verbosity=0);
@test ŷ7 ≈ predict(model_cold, Xtest)

# test cold restart if another hyperparameter is changed:
# test that we get a cold restart if another hyperparameter is changed:
model2 = update(model, Xtrain, y[train]; atom=Ridge(0.05))
algorithm2 = LearnAPI.clone(LearnAPI.algorithm(model); atom=Ridge(0.05))
@test predict(model, Xtest) ≈ predict(model2, Xtest)
algorithm2 = Ensemble(Ridge(0.05); n=7, rng)
model_cold = fit(algorithm2, Xtrain, y[train]; verbosity=0)
@test predict(model2, Xtest) ≈ predict(model_cold, Xtest)

end

Expand Down
Loading
Loading