Skip to contents

Exposes the K mixture components as decision segments: each regime's prevalence (weight), its within-segment treatment effect (the within-class treatment slope), its residual standard deviation, and its covariate centre. This is the interpretable by-product the closed-form reading gives for free.

Usage

proxy_regime_segments(model, t1 = 1, t0 = 0)

Arguments

model

An uplift_model.

t1, t0

The treated and control treatment values used to scale the within-segment effect. Default 1 and 0.

Value

A data.table::data.table with columns regime, weight, effect, sigma, and one column per covariate centre.

Examples

set.seed(1)
n <- 600L
x <- stats::rnorm(n)
t <- stats::rbinom(n, 1L, 0.5)
y <- 1 + (0.5 + x) * t + stats::rnorm(n, sd = 0.5)
dat <- data.frame(y = y, t = t, x = x)
m <- fit_uplift(dat, "y", "t", "x", N = 2L, regime = "sample",
                max_iter = 80L, seed = 1L)
proxy_regime_segments(m)
#>    regime    weight effect     sigma           x
#>     <int>     <num>  <num>     <num>       <num>
#> 1:      1 0.5183333      0 0.5074257  0.06613434
#> 2:      2 0.4816667      0 0.5065112 -0.04739679