@@ -24,22 +24,19 @@ function SoleModels.alphabet(
24
24
kwargs...
25
25
)
26
26
27
- function _alphabet! (a:: Vector , model:: DT.Ensemble , args... ; kwargs... )
28
- map (t -> _alphabet! (a, t, args... ; kwargs... ), model. trees)
27
+ function _alphabet! (a:: Vector , model:: DT.Ensemble , args... ; featurenames = nothing , kwargs... )
28
+ map (t -> _alphabet! (a, t, args... ; featurenames, kwargs... ), model. trees)
29
29
return a
30
30
end
31
31
32
- function _alphabet! (a:: Vector , model:: DT.InfoNode , args... ; kwargs... )
33
- _alphabet! (a, model. left, args... ; kwargs... )
34
- _alphabet! (a, model. right, args... ; kwargs... )
32
+ function _alphabet! (a:: Vector , model:: DT.InfoNode , args... ; featurenames = true , kwargs... )
33
+ featurenames = featurenames == true ? model. info. featurenames : featurenames
34
+ _alphabet! (a, model. left, args... ; featurenames, kwargs... )
35
+ _alphabet! (a, model. right, args... ; featurenames, kwargs... )
35
36
return a
36
37
end
37
38
38
- function _alphabet! (a:: Vector , model:: DT.Node , args... ;
39
- featurenames = true ,
40
- kwargs...
41
- )
42
- featurenames = featurenames == true ? model. info. featurenames : featurenames
39
+ function _alphabet! (a:: Vector , model:: DT.Node , args... ; featurenames, kwargs... )
43
40
push! (a, Atom (get_condition (model. featid, model. featval, featurenames)))
44
41
return a
45
42
end
@@ -51,7 +48,6 @@ function SoleModels.alphabet(
51
48
return SoleData. scalaralphabet (_alphabet! (Atom{ScalarCondition}[], model, args... ; kwargs... ))
52
49
end
53
50
54
-
55
51
function SoleModels. solemodel (
56
52
model:: DT.Ensemble ,
57
53
args... ;
0 commit comments