X-Learner Uplift Model in Python | Meta Learner | Machine Learning

Опубликовано: 29 Апрель 2026
на канале: Grab N Go Info
2,449
33

X-learner is a meta-learner that is an extension of the T-learner. Compared with T-learner, X-learner is better for highly imbalanced treatment and control groups. In this tutorial, we will talk about the following:

👉 How to implement X-learner manually in Python?
👉 How to make an individual treatment effect (ITE) estimation using X-learner?
👉 How to calculate average treatment effect (ATE) estimation using X-learner?

⏰ Timecodes ⏰
0:00 - Intro
0:22 - Step 0: X-learner Algorithm
1:44 - Step 1: Install and Import Libraries
2:38 - Step 2: Pull Data
3:07 - Step 3: X-learner Model Data Processing
3:52 - Step 4: X-Learner 1st Stage Models on Outcomes
4:43 - Step 5: X-Learner 1st Stage Model Predictions on Outcomes
5:11 - Step 6: X-Learner 2nd Stage Models on Imputed ITE
5:58 - Step 7: X-Learner 2nd Stage Model Predictions on Imputed ITE
6:16 - Step 8: X-Learner Propensity Score Model
6:42 - Step 9: X-learner Individual Treatment Effect (ITE)
8:16 - Step 10: X-Learner Average Treatment Effect (ATE)
8:39 - Step 11: Customer Segmentation Using T-learner Individual Treatment Effect (ITE)

❤️ Blog post with code for this video:   / x-learner-uplift-model-in-python  
📒 Code Notebook: https://mailchi.mp/a744ca6959e7/t0707...
🚛 GrabNGoInfo Machine Learning Tutorials Inventory:   / grabngoinfo-machine-learning-tutorials-inv...  

🏪 Purchase data science and computer science themed products in my Amazon store: https://amzn.to/40HUTsl
🙏 Give me a tip to show your appreciation and help me keep providing free content: https://www.paypal.com/donate/?hosted...
✅ Join Medium Membership: If you are not a Medium member and want to support me to keep providing free content (😄 Buy me a cup of coffee ☕), join Medium membership through this link:   / membership  
You will get full access to posts on Medium for $5 per month, and I will receive a portion of it. Thank you for your support!

🎞️ Uplift Model playlist:    • Uplift Model  

🔥 Check out more machine learning tutorials on my website!
https://grabngoinfo.com/tutorials/
🛎️ SUBSCRIBE to GrabNGoInfo https://bit.ly/3keifBY
📧 CONTACT me at [email protected]
👩🏻‍💻 Follow me on LinkedIn:   / grabngoinfo  

#upliftmodel #causalinference #MachineLearning #DataScience #GrabNGoInfo