Add the uplift-specific split regularization that the legacy tree applies during growth, via a custom builder that subclasses the shared kernel TreeBuilder (mirroring causal/_builder.pyx).
Depends on Issue 1 (kernel-backed KL/ED/Chi tree scaffold).
Scope
_uplift/_builder.pyx + .pxd: DepthFirst/BestFirstUpliftTreeBuilder(TreeBuilder) mirroring causal/_builder.pyx — downcast the criterion to read per-group counts and:
- enforce
min_samples_treatment (minimum units per treatment group in each child),
- apply the
n_reg parent-shrinkage the legacy gain applies via parentNodeSummary,
early_stopping_eval_diff_scale (validation-set early stopping may fold in here, or split to its own issue if it doesn't fit the builder cleanly).
- Wire the estimator to select the uplift builder instead of the stock kernel builder.
Verify
min_samples_treatment respected (no child with fewer than the threshold per group).
- Parity vs legacy defaults (
n_reg=100, min_samples_treatment=10) for KL/ED/Chi on a fixed seed.
Reusable templates
- Builder subclass:
causalml/inference/tree/causal/_builder.pyx + .pxd (DepthFirst/BestFirstCausalTreeBuilder add min_group_samples by downcasting the criterion).
- Legacy regularization:
uplift.pyx growDecisionTreeFrom (~1968–2394) and the n_reg shrinkage in the gain.
Part of #945.
Add the uplift-specific split regularization that the legacy tree applies during growth, via a custom builder that subclasses the shared kernel
TreeBuilder(mirroringcausal/_builder.pyx).Depends on Issue 1 (kernel-backed KL/ED/Chi tree scaffold).
Scope
_uplift/_builder.pyx+.pxd:DepthFirst/BestFirstUpliftTreeBuilder(TreeBuilder)mirroringcausal/_builder.pyx— downcast the criterion to read per-group counts and:min_samples_treatment(minimum units per treatment group in each child),n_regparent-shrinkage the legacy gain applies viaparentNodeSummary,early_stopping_eval_diff_scale(validation-set early stopping may fold in here, or split to its own issue if it doesn't fit the builder cleanly).Verify
min_samples_treatmentrespected (no child with fewer than the threshold per group).n_reg=100,min_samples_treatment=10) for KL/ED/Chi on a fixed seed.Reusable templates
causalml/inference/tree/causal/_builder.pyx+.pxd(DepthFirst/BestFirstCausalTreeBuilderaddmin_group_samplesby downcasting the criterion).uplift.pyxgrowDecisionTreeFrom(~1968–2394) and then_regshrinkage in the gain.Part of #945.