Skip to content

Commit ce35e3e

Browse files
authored
Merge pull request #192 from alan-turing-institute/dev
Add EvoTrees. For 0.8.1 release
2 parents 03ad2f9 + b8eb732 commit ce35e3e

File tree

9 files changed

+265
-166
lines changed

9 files changed

+265
-166
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MLJModels"
22
uuid = "d491faf4-2d78-11e9-2867-c94bc002c0b7"
33
authors = ["Anthony D. Blaom <[email protected]>"]
4-
version = "0.8.0"
4+
version = "0.8.1"
55

66
[deps]
77
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Repository of selected
66
[MLJ](https://github.com/alan-turing-institute/MLJ.jl) model
77
interfaces, and home of the MLJ model registry.
88

9+
For instructions on integrating a new model with MLJ visit
10+
[here](https://alan-turing-institute.github.io/MLJ.jl/dev/adding_models_for_general_use/)
11+
12+
913
### Contents
1014

1115
- [Who is this repo for?](#who-is-this-repo-for)
@@ -64,25 +68,30 @@ MLJModels contains:
6468
## Instructions for updating the MLJ model registry
6569

6670
Generally model registration is performed by administrators. If you
67-
have an interface you would like registered, open an issue on this repo.
71+
have an interface you would like registered, open an issue
72+
[here](https://github.com/alan-turing-institute/MLJ.jl/issues).
6873

6974
To register all the models in GreatNewPackage with MLJ:
7075

7176
- In the dev branch of a clone of the dev branch of MLJModels, change
7277
to the `/src/registry/` directory and, in Julia, activate the
7378
environment specified by the Project.toml there, after checking the
74-
[compat] conditions there are up to date.
79+
[compat] conditions there are up to date. **Do not use** `Revise`.
7580

7681
- Add `GreatNewPackage` to the environment.
7782

78-
- In some environment in which your MLJModels clone has been added
79-
using `Pkg.dev`, execute `using MLJModels; @update`. This updates
83+
- In some environment to which your MLJModels clone has been added
84+
(using `Pkg.dev`) execute `using MLJModels; @update`. This updates
8085
`src/registry/Metadata.toml` and `src/registry/Models.toml` (the
8186
latter is generated for convenience and not used by MLJ).
8287

8388
- Test that interfaces load with `MLJModels.check_registry()`
8489

85-
- Quit your REPL session, whose namespace is now polluted.
90+
- Quit your REPL session, whose namespace is now polluted.
91+
92+
- *Note.* that your local MLJModels will not immediately adopt the
93+
updated registry because that requires pre-compilation; for
94+
technical reasons the registry is not loaded in `__init__`()`.
8695

8796
- Push your changes to an appropriate branch of MLJModels to make
8897
the updated metadata available to users of the next MLJModels tagged

src/model_search.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ List all models whose names are in the namespace of the specified
185185
module `modl`, or meeting the `conditions`, if specified. Here a
186186
*condition* is a `Bool`-valued function on models.
187187
188-
See also [models](@ref)
188+
See also [`models`](@ref)
189189
190190
"""
191191
function localmodels(args...; modl=Main)

src/registry/Metadata.toml

Lines changed: 240 additions & 156 deletions
Large diffs are not rendered by default.

src/registry/Models.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ MultivariateStats = ["ICA", "BayesianLDA", "BayesianSubspaceLDA", "RidgeRegresso
77
DecisionTree = ["AdaBoostStumpClassifier", "DecisionTreeRegressor", "DecisionTreeClassifier", "RandomForestRegressor", "RandomForestClassifier"]
88
Clustering = ["KMeans", "KMedoids"]
99
XGBoost = ["XGBoostCount", "XGBoostRegressor", "XGBoostClassifier"]
10+
EvoTrees = ["EvoTreeClassifier", "EvoTreeGaussian", "EvoTreeRegressor", "EvoTreeCount"]
1011
MLJModels = ["ConstantClassifier", "Standardizer", "DeterministicConstantClassifier", "OneHotEncoder", "UnivariateBoxCoxTransformer", "ConstantRegressor", "FeatureSelector", "UnivariateDiscretizer", "FillImputer", "DeterministicConstantRegressor", "UnivariateStandardizer"]
1112
LIBSVM = ["EpsilonSVR", "LinearSVC", "NuSVR", "NuSVC", "SVC", "OneClassSVM"]
1213
GLM = ["LinearBinaryClassifier", "LinearCountRegressor", "LinearRegressor"]

src/registry/Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[deps]
22
Clustering = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5"
33
DecisionTree = "7806a523-6efd-50cb-b5f6-3fa6f1930dbb"
4+
EvoTrees = "f6006082-12f8-11e9-0c9c-0d5d367ab1e5"
45
GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a"
56
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
67
LIBSVM = "b1bec4e5-fd48-53fe-b0cb-9723c09d164b"
@@ -17,7 +18,7 @@ XGBoost = "009559a3-9522-5dbb-924b-0b6ed2b22bb9"
1718

1819
[compat]
1920
MLJBase = "^0.11"
20-
MLJModelInterface = "^0.1"
21+
MLJModelInterface = "^0.1.7"
2122

2223
[extras]
2324
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

src/registry/src/Registry.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ function _update(mod, test_env_only)
125125
mod.eval(program1)
126126
test_env_only || mod.eval(program2)
127127

128-
println("If you have called @update from the REPL then your namespace "*
129-
"is now polluted. Restart your REPL. ")
128+
println("You can now check the registry by running "*
129+
"`MLJModels.check_registry().\n\n"*
130+
"You can safely ignore \"conflicting import\" warnings. ")
130131

131132
true
132133
end

src/registry/src/check_registry.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ function check_registry()
2020
end
2121
end
2222
end
23+

test/DecisionTree.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ using Test
44
import CategoricalArrays
55
import CategoricalArrays.categorical
66
using MLJBase
7+
using Random
8+
Random.seed!(1234)
79

810
# load code to be tested:
911
import MLJModels

0 commit comments

Comments
 (0)