Closed co2chicken closed 1 year ago
Thanks! This is definitely an improvement.
Is there any reason not to do this just by modifying _tree_display_branch_string
? For example
function _tree_display_branch_string(node, j::Integer)
if node.yes == node.id
string(node.split, " < ", round(node.split_condition, digits=3))
else
string(node.split, " ≥ ", round(node.split_condition, digits=3))
end
end
(and call as _tree_display_branch_string(ch[j], j)
)
One advantage of this would be maintaining proper type inference for the collection type.
Superseded by #162
Term.Tree() view is missing important information for every node, the split condition. Because the split condition is missing, the tree has almost no useful value. See the comparison of the old(top) and proposed(bottom) below:
In the top, it is impossible to know how to navigate through the tree with values for x1 and x2, while it is possible on the bottom.