A User Parameter-free Bayesian Framework for Uplift Modeling
Project description
kuplift package
kuplift is a Python package that provides a series of uplift modeling methods based on recent research work. kuplift allows users to easily use the following algorithms:
-
Encoding data using a discretization method for treatment effect (uplift) modeling called UMODL.
-
Variable selection for uplift modeling with UMODL-FS.
-
Learning a Bayesian decision tree model for uplift modeling with UB-DT.
-
Learning a random forest model for uplift modeling with UB-RF.
How to install:
pip install kuplift
User Guide:
import kuplift as kp
import pandas as pd
df = pd.read_csv("dataname.csv")
# Univariate variable transformation:
ue = kp.UnivariateEncoding()
encoded_data = ue.fit_transform(df[column_names], df["treatment"], df["outcome"])
# Feature selection
fs = kp.FeatureSelection()
important_vars = fs.filter(df[column_names], df["treatment"], df["outcome"])
# Uplift Bayesian Decision Tree
tree = kp.BayesianDecisionTree(df[column_names], df["treatment"], df["outcome"])
tree.fit()
preds = tree.predict(df[column_names])
# Uplift Bayesian Random Forest
forest = kp.BayesianRandomForest(df[column_names], df["treatment"], df["outcome"])
forest.fit()
preds = forest.predict(df[column_names])
Documentation:
Refer to the documentation at https://udata-orange.github.io/kuplift/
Credits: kuplift has been developed at Orange Labs.
Current contributors:
Mina Rafla
Nicolas Voisine
References:
Rafla, M., Voisine, N., Crémilleux, B., & Boullé, M. (2022, September). A non-parametric bayesian approach for uplift discretization and feature selection. ECML PKDD 2022
Rafla, M., Voisine, N., & Crémilleux, B. (2023, May). Parameter-free Bayesian decision trees for uplift modeling. PAKDD 2023
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.