Skip to content

Commit

Permalink
Confirm that the problem occurs on 2 datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
rikhuijzer committed Jun 21, 2023
1 parent 365137d commit 31d56f3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
LightGBM = "7acf609c-83a4-11e9-1ffb-b912bcd3b04a"
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
MLJ = "add582a8-e3ab-11e8-2d5e-e98b27df1bc7"
MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
MLJDecisionTreeInterface = "c6f25543-311c-4c74-83dc-3ea6d1015661"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PlutoStaticHTML = "359b1769-a58e-495b-9770-312e911026ad"
Expand All @@ -26,6 +27,7 @@ DecisionTree = "0.12"
Documenter = "0.27"
LiveServer = "1"
MLJ = "0.19"
MLJBase = "0.21"
MLJDecisionTreeInterface = "0.4"
PlutoStaticHTML = "6"
PlutoUI = "0.7"
Expand Down
22 changes: 19 additions & 3 deletions test/mlj.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ datasets = Dict{String,Tuple}(
y = df.survival
(X, y)
end,
"boston" => boston()
"boston" => boston(),
"make_regression" => let
make_regression(200, 3; noise=0.0, sparse=0.0, outliers=0.0)
end
)

function _score(e::PerformanceEvaluation)
Expand Down Expand Up @@ -200,8 +203,21 @@ preds = predict(rulesmach)
@test preds isa Vector{Float64}
# @test 0.95 < rsq(preds, y)

let
# e = _evaluate_baseline!(results, "boston")
emr = let
hyper = (;)
measure = rsq
_evaluate!(results, "make_regression", LGBMRegressor, hyper; measure)
_evaluate!(results, "make_regression", LinearRegressor, hyper; measure)
_evaluate!(results, "make_regression", StableForestRegressor, hyper; measure)

hyper = (; rng=_rng(), n_trees=1_500, max_rules=500)
_evaluate!(results, "make_regression", StableRulesRegressor, hyper; measure)

hyper = (; rng=_rng(), n_trees=1_500, max_rules=30)
_evaluate!(results, "make_regression", StableRulesRegressor, hyper; measure)

hyper = (; rng=_rng(), n_trees=1_500, max_rules=10)
_evaluate!(results, "make_regression", StableRulesRegressor, hyper; measure)
end

el = let
Expand Down

0 comments on commit 31d56f3

Please sign in to comment.