Make plot.py's visualization helpers work with the kernel-backed uplift tree.
Depends on Issue 1 (a kernel-backed tree exists to plot); realistically sequenced near the end, before switchover.
Scope
plot.py's uplift_tree_string / uplift_tree_plot / plot_dist_tree_leaves_values duck-type the legacy pure-Python DecisionTree node (results, col, value, trueBranch, falseBranch, classes_, summary[impurity/matchScore/upliftScore/samples/group_size]). Two options:
- Rework the plot helpers to read the kernel
Tree node array + criterion leaf stats directly, or
- Provide a lightweight
DecisionTree-shaped adapter exposing the fields plot.py duck-types.
Pick whichever is less invasive; option 2 keeps plot.py untouched.
Verify
test_uplift_tree_visualization (create_png) passes against the kernel-backed tree.
Reusable templates
- Legacy node fields consumed by
plot.py; the kernel Tree node array + the criterion's leaf value layout.
Part of #945.
Make
plot.py's visualization helpers work with the kernel-backed uplift tree.Depends on Issue 1 (a kernel-backed tree exists to plot); realistically sequenced near the end, before switchover.
Scope
plot.py'suplift_tree_string/uplift_tree_plot/plot_dist_tree_leaves_valuesduck-type the legacy pure-PythonDecisionTreenode (results,col,value,trueBranch,falseBranch,classes_,summary[impurity/matchScore/upliftScore/samples/group_size]). Two options:Treenode array + criterion leaf stats directly, orDecisionTree-shaped adapter exposing the fieldsplot.pyduck-types.Pick whichever is less invasive; option 2 keeps
plot.pyuntouched.Verify
test_uplift_tree_visualization(create_png) passes against the kernel-backed tree.Reusable templates
plot.py; the kernelTreenode array + the criterion's leaf value layout.Part of #945.