Add kernel-vs-legacy uplift tree parity notebook (#945) - #969
Merged
Conversation
jeongyoonlee
marked this pull request as ready for review
July 24, 2026 22:54
jeongyoonlee
requested review from
alexander-pv,
huigangchen,
paullo0106,
ppstacy,
ras44,
t-tte,
vincewu51 and
zhenyuz0500
July 24, 2026 22:54
Add docs/examples/uplift_tree_kernel_parity.ipynb demonstrating that the experimental kernel-backed uplift tree and forest reproduce the legacy UpliftTreeClassifier / UpliftRandomForestClassifier numerically: - single-tree parity across KL / ED / Chi and DDP / IT / CIT / IDDP - tree visualization: legacy and kernel trees render through the same plot.uplift_tree_plot (issue #953) - regularization, normalization, and the honest approach - whole-forest parity, plus a fit-time speed comparison - continuous features diverge (different split grids); discretizing them restores exact parity, showing the difference is only the candidate grid Wire the notebook into the docs examples toctree.
jeongyoonlee
force-pushed
the
feature/945-parity-notebook
branch
from
July 24, 2026 23:05
4dc366a to
4945f0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
docs/examples/uplift_tree_kernel_parity.ipynb, a validation notebook for the tree-unification epic (#945) that demonstrates the experimental kernel-backed uplift trees reproduce the legacy implementation numerically.The notebook shows, with executed outputs, that
_KernelUpliftTreeClassifier/_KernelUpliftRandomForestClassifiermatchUpliftTreeClassifier/UpliftRandomForestClassifierbit-for-bit (max abs difference0.0) on:plus a fit-time speed comparison (kernel ~3x faster on the sampled data).
The last section makes the parity conditions concrete: on genuinely continuous features the two diverge because they search different split grids, but discretizing the same features restores exact parity — confirming the difference is only the split-candidate grid, not the criterion math.
Notes
legacy_max_depth = kernel_max_depth + 1(both explained in the notebook).docs/examples.rst).