Skip to content

Commit dbe8e83

Browse files
committed
fix extras deps
1 parent 1b5a6c6 commit dbe8e83

File tree

4 files changed

+12
-479
lines changed

4 files changed

+12
-479
lines changed

Project.toml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
name = "SoleModels"
22
uuid = "4249d9c7-3290-4ddd-961c-e1d3ec2467f8"
33
license = "MIT"
4-
authors = [
5-
"Michele GHIOTTI",
6-
"Giovanni PAGLIARINI",
7-
"Edoardo PONSANESI",
8-
"Eduard I. STAN",
9-
]
4+
authors = ["Michele GHIOTTI", "Giovanni PAGLIARINI", "Edoardo PONSANESI", "Eduard I. STAN"]
105
version = "0.10.0"
116

127
[deps]
@@ -45,7 +40,6 @@ XGBoostExt = "XGBoost"
4540

4641
[compat]
4742
AbstractTrees = "0.4"
48-
BenchmarkTools = "1"
4943
CSV = "0.10"
5044
CategoricalArrays = "0.10"
5145
DataFrames = "1"
@@ -74,19 +68,23 @@ ZipFile = "0.10"
7468
julia = "1"
7569

7670
[extras]
77-
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
71+
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
7872
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
73+
DecisionTree = "7806a523-6efd-50cb-b5f6-3fa6f1930dbb"
74+
FunctionWrappers = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e"
7975
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
8076
MLJ = "add582a8-e3ab-11e8-2d5e-e98b27df1bc7"
8177
MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
8278
MLJDecisionTreeInterface = "c6f25543-311c-4c74-83dc-3ea6d1015661"
8379
MLJModelInterface = "e80e1ace-859a-464e-9ed9-23947d8ae3ea"
8480
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
8581
MultiData = "8cc5100c-b3d1-4f82-90cb-0ea93d317aba"
86-
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
8782
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
8883
SoleData = "123f1ae1-6307-4526-ab5b-aab3a92a2b8c"
84+
SoleLogics = "b002da8f-3cb3-4d91-bbe3-2953433912b5"
85+
SoleModels = "4249d9c7-3290-4ddd-961c-e1d3ec2467f8"
8986
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
87+
XGBoost = "009559a3-9522-5dbb-924b-0b6ed2b22bb9"
9088

9189
[targets]
92-
test = ["Test", "DataFrames", "Random", "MLJ", "MultiData", "Markdown", "InteractiveUtils", "BenchmarkTools", "MLJBase", "XGBoost", "DecisionTree", "MLJModelInterface", "MLJDecisionTreeInterface", "SoleData"]
90+
test = ["Test", "CategoricalArrays", "DataFrames", "Random", "MLJ", "MultiData", "Markdown", "InteractiveUtils", "MLJBase", "XGBoost", "DecisionTree", "MLJModelInterface", "MLJDecisionTreeInterface", "SoleData", "SoleModels", "SoleLogics", "FunctionWrappers"]

ext/MLJXGBoostInterfaceExt.jl

Lines changed: 0 additions & 308 deletions
This file was deleted.

test/XGBoostExt/xgboost_classifier.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Test
22

33
using MLJ
4-
using MLJ.CategoricalArrays: levelcode, categorical
54
using MLJBase
65
using DataFrames
76

@@ -58,7 +57,7 @@ solem = solemodel(trees, Matrix(X_train), y_train; classlabels, featurenames, ke
5857
# Make test instances flow into the model
5958
X_test_f32 = mapcols(col -> Float32.(col), X_test)
6059
preds = apply(solem, X_test_f32)
61-
predsl = CategoricalArrays.levelcode.(categorical(preds)) .- 1
60+
predsl = CategoricalArrays.levelcode.(CategoricalArrays.categorical(preds)) .- 1
6261

6362
apply!(solem, X_test, y_test)
6463
@test solem.info.supporting_predictions == preds
@@ -67,7 +66,7 @@ apply!(solem, X_test, y_test)
6766
# ---------------------------------------------------------------------------- #
6867
# julia XGBoost #
6968
# ---------------------------------------------------------------------------- #
70-
yl_train = CategoricalArrays.levelcode.(categorical(y_train)) .- 1
69+
yl_train = CategoricalArrays.levelcode.(CategoricalArrays.categorical(y_train)) .- 1
7170
# create and train a gradient boosted tree model of 5 trees
7271
bst = XGB.xgboost(
7372
(X_train, yl_train),
@@ -143,9 +142,9 @@ println("RandomForest accuracy: ", rm_accuracy)
143142
solem = solemodel(trees, Matrix(X_train), y_train; classlabels, featurenames)
144143
X_test_f32 = mapcols(col -> Float32.(col), X_test)
145144
preds = apply!(solem, X_test_f32, y_test)
146-
predsl = CategoricalArrays.levelcode.(categorical(preds)) .- 1
145+
predsl = CategoricalArrays.levelcode.(CategoricalArrays.categorical(preds)) .- 1
147146

148-
yl_train = CategoricalArrays.levelcode.(categorical(y_train)) .- 1
147+
yl_train = CategoricalArrays.levelcode.(CategoricalArrays.categorical(y_train)) .- 1
149148
bst = XGB.xgboost((X_train, yl_train); num_round, eta, num_class=3, objective="multi:softmax")
150149
xg_preds = XGB.predict(bst, X_test)
151150

0 commit comments

Comments
 (0)