Skip to content

[Tree unification 7/9] plot.py compatibility with the kernel Tree #953

Description

@jeongyoonlee

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:

  1. Rework the plot helpers to read the kernel Tree node array + criterion leaf stats directly, or
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions