File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,10 @@ Graphs = "1.8"
51
51
HTTP = " 1.9"
52
52
IterTools = " 1"
53
53
Lazy = " 0.15.1"
54
- MLJ = " 0.20"
55
- MLJBase = " 1.6"
54
+ MLJ = " 0.19 - 0. 20"
55
+ MLJBase = " 1.6 - 1.7 "
56
56
MLJDecisionTreeInterface = " 0.4"
57
- MLJModelInterface = " 1.8.0 "
57
+ MLJModelInterface = " 1.8"
58
58
PrettyTables = " 2.2"
59
59
ProgressMeter = " 1"
60
60
Random = " 1"
Original file line number Diff line number Diff line change @@ -373,20 +373,22 @@ _listrules(m::DecisionTree; kwargs...) = _listrules(root(m); kwargs...)
373
373
374
374
function _listrules (
375
375
m:: DecisionEnsemble ;
376
- suppress_parity_warning = false ,
376
+ # weights::Union{Nothing, AbstractVector} = nothing,
377
+ suppress_parity_warning = true ,
377
378
kwargs...
378
379
)
379
- error (" TODO check method & implement more efficient strategies for specific cases." )
380
- modelrules = [listrules (subm; kwargs... ) for subm in models (m)]
380
+ # error("TODO check method & implement more efficient strategies for specific cases.")
381
+ modelrules = [_listrules (subm; kwargs... ) for subm in models (m)]
381
382
@assert all (r-> consequent (r) isa ConstantModel, Iterators. flatten (modelrules))
382
383
383
384
IterTools. imap (rulecombination-> begin
384
385
rulecombination = collect (rulecombination)
385
386
ant = join_antecedents (antecedent .(rulecombination))
386
- cons = bestguess (outcome .(consequent .(rulecombination)); suppress_parity_warning)
387
- infos = info .(rulecombination)
388
- # TODO @show infos; info = (;)
389
- Rule (ant, cons)
387
+ o_cons = bestguess (outcome .(consequent .(rulecombination)), m. weights; suppress_parity_warning)
388
+ i_cons = merge (info .(consequent .(rulecombination))... )
389
+ cons = ConstantModel (o_cons, i_cons)
390
+ infos = merge (info .(rulecombination)... )
391
+ Rule (ant, cons, infos)
390
392
end , Iterators. product (modelrules... )
391
393
)
392
394
end
You can’t perform that action at this time.
0 commit comments