pythonscikit-learncausality

sklift inference: how to get probabilities for treatment vs no-treatment?


I am working with sklift to describe what the uplift for a given treatment (in this case marketing discount) is. When training the model, we can get both probabilities, such as:

# model results: conditional probabilities of treatment effect
# probability of performing the targeted action (visits):
#prob_treat = model_sm.trmnt_preds_         # probability in treatment group
#prob_control = model_sm.ctrl_preds_        # probability in control group

But when I try to get these prob_treat and prob_control for inference (unseen data), I cannot find anything in the docs. All I can do is to get the uplift using model.predict(X_val). I am in need to understand for inference what the probas are if treatment are given vs not given. Can some one help?


Solution

  • I didn't use sklift and I use causalml package which is from Uber. But I have some ideas about your question.

    1. From your description I guess you are using T-learner or S-learner which predict the probability seperately in treatment group and control group.
    2. So, the result(uplift value) you want is prob_treat-prob_control.
    3. And the probas when treatment are given or not given are counter-factual outcomes.