Skip to main content

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. OptimizedUnivariateEncoding is an optimized version of the umodl algorithm written in C++ for continuous and categorical variables.

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

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

  5. 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("data.csv")

# Make sure the dtype of all categorical variables is object
df = df.astype({"some_categorical_variable": object})

variables = list(df.columns[:-2])  # Last two columns are treatment and target columns

# Univariate variable transformation
ue = kp.UnivariateEncoding()
encoded_data = ue.fit_transform(df[variables], df["treatment"], df["target"])

# Univariate variable transformation optimized through the use of the C++ implementation of umodl
ue = kp.OptimizedUnivariateEncoding()
encoded_data = ue.fit_transform(df[variables], df["treatment"], df["target"])

# Feature selection
fs = kp.FeatureSelection()
important_vars = fs.filter(df[variables], df["treatment"], df["target"])

# Uplift Bayesian Decision Tree
tree = kp.BayesianDecisionTree()
tree.fit(df[variables], df["treatment"], df["target"])
preds = tree.predict(df[variables])

# Uplift Bayesian Random Forest
forest = kp.BayesianRandomForest(n_trees=4)
forest.fit(df[variables], df["treatment"], df["target"])
preds = forest.predict(df[variables])

Examples

You can find examples in the examples directory.

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

Metadata

Release files for kuplift 0.0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kuplift 0.0.16
File Size Uploaded
kuplift-0.0.16.tar.gz 72.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kuplift 0.0.16
File Interpreter ABI Platform
kuplift-0.0.16-py3-none-any.whl Python 3 none any Details

Total release size: 104.8 kB

Release files / kuplift-0.0.16.tar.gz

Download URL kuplift-0.0.16.tar.gz
Size 72.2 kB
Tags Source
SHA-256 checksum
How to use checksums
08de62cc796aedb35298e4272abcd6b17415db32dd37125f48451c30e2f9d7de
BLAKE2b-256 checksum
How to use checksums
77d9c2a7e9dd4a5d8e927230d8d63c066810a677e455bc21d366eb99bcaac0e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 25, 2026.

Transparency log

Release files / kuplift-0.0.16-py3-none-any.whl

Download URL kuplift-0.0.16-py3-none-any.whl
Size 32.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bde030fefd2c38e15ed19e34051e5d98f2e19a5dbc7c154b8ce380861def0acb
BLAKE2b-256 checksum
How to use checksums
566d45e59f8c3f68d9390e4234398dbbcfadf9fa917c2d7076b578dbf553ed49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 25, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page