File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,10 @@ const PKG = "MLJDecisionTreeInterface"
15
15
16
16
struct TreePrinter{T}
17
17
tree:: T
18
+ features:: Vector{Symbol}
18
19
end
19
- (c:: TreePrinter )(depth) = DT. print_tree (c. tree, depth)
20
- (c:: TreePrinter )() = DT. print_tree (c. tree, 5 )
20
+ (c:: TreePrinter )(depth) = DT. print_tree (c. tree, depth, feature_names = c . features )
21
+ (c:: TreePrinter )() = DT. print_tree (c. tree, 5 , feature_names = c . features )
21
22
22
23
Base. show (stream:: IO , c:: TreePrinter ) =
23
24
print (stream, " TreePrinter object (call with display depth)" )
@@ -71,7 +72,7 @@ function MMI.fit(
71
72
cache = nothing
72
73
report = (
73
74
classes_seen= classes_seen,
74
- print_tree= TreePrinter (tree),
75
+ print_tree= TreePrinter (tree, features ),
75
76
features= features,
76
77
)
77
78
return fitresult, cache, report
You can’t perform that action at this time.
0 commit comments