Skip to main content

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:

  1. Encoding data using a discretization method for treatment effect (uplift) modeling called UMODL.

  2. Variable selection for uplift modeling with UMODL-FS.

  3. Learning a Bayesian decision tree model for uplift modeling with UB-DT.

  4. 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.

Source Distribution

kuplift-0.0.5.tar.gz (58.8 kB view hashes)

Uploaded Source

Built Distribution

kuplift-0.0.5-py3-none-any.whl (27.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page