Skip to main content

Automatic Uplift Framework (AUF)

AutoML library for automatic uplift modeling


Table of Contents

  1. Description
  2. Key Features
  3. Installation
  4. Quick Start
  5. Project Structure
  6. License

Description

AUF (Automatic Uplift Framework) is an AutoML library that provides a complete pipeline for building uplift models. The library automates all stages: data validation, statistical significance testing of treatment effects, feature selection and ranking, model training (S-, T-, X-learners, uplift trees and forests), optimal model selection, and generation of detailed quality analytics with visualization.

AUF supports multi-treatment and integrates with MLflow for experiment tracking, making it an ideal tool for rapid prototyping and production-ready solutions in personalized interventions.


Key Features

  • Complete AutoML pipeline from raw data to production-ready model
  • Statistical effect validation via bootstrap significance testing
  • Automatic feature selection with 5 possible ranking strategies (filters, importance, permutation, stepwise selection)
  • Support for all major uplift methods: S-Learner, X-Learner, uplift trees, random forest
  • Comprehensive visualization: Qini curves, uplift curves, conversion by buckets, discrete and continuous plots
  • MLflow integration for automatic logging of metrics, artifacts, and models
  • Multi-treatment support

Installation

Standard installation from PyPI:

# Create a new virtual environment (highly recommended)
conda create -n auf_env python=3.8 -y
conda activate auf_env

# Install AUF
pip install auf

Installation from source:

git clone https://github.com/Alfa-Advanced-Analytics/auf.git
cd auf
pip install -e .

Quick Start

from auf.pipeline import UpliftPipeline

# Initialize pipeline
pipeline = UpliftPipeline(
    print_doc=False,
    task_name_mlflow='test_auf',
    run_description='Testing AUF library',
)

# Load data with ID, target, treatment, features columns
df = load_your_data()

# Map unified base columns names into user base columns names
base_cols_mapper = {
    'id': "id",
    'treatment': 'treatment',
    'target': 'target',
    'segm': None
}

# Map treatment groups names into unified ones (0 and 1)
treatment_groups_mapper = {
    "control": 0,
    "treatment": 1
}

# Load data in the pipeline
pipeline.load_sample(
    df,
    base_cols_mapper,
    treatment_groups_mapper
)

# Run full pipeline
pipeline.run()

# All results are:
# 1) saved to MLflow (if configured)
# 2) plotted by pipeline during its work

Important: DataFrame df must be pre-formatted with column names for ID, target, and treatment specified via mapping dictionaries.


Project Structure

auf/  
├── __init__.py  
├── constants/  
│   ├── # Predefined metrics and parameters  
│   ├── __init__.py  
│   ├── metrics.py  
│   └── numbers.py  
├── data/  
│   ├── # Data validation and preprocessing  
│   ├── __init__.py  
│   ├── checks.py  
│   ├── preprocessing.py  
│   └── split.py  
├── feature_rankers/  
│   ├── # Feature ranking strategies  
│   ├── __init__.py  
│   ├── filter.py  
│   ├── importance.py  
│   ├── permutation.py  
│   ├── stepwise.py  
│   └── straightforward.py  
├── log/  
│   ├── # Logging and progress tracking  
│   ├── __init__.py  
│   └── log.py  
├── metrics/  
│   ├── # Custom uplift metrics  
│   ├── __init__.py  
│   ├── averaged.py  
│   ├── by_top.py  
│   └── overfit.py  
├── ml_flow/  
│   ├── # MLflow integration  
│   ├── __init__.py  
│   └── ml_flow.py  
├── models/  
│   ├── # Uplift model implementations  
│   ├── __init__.py  
│   ├── auf_forest.py  
│   ├── auf_model.py  
│   ├── auf_tree.py  
│   └── auf_x_learner.py  
├── pipeline/  
│   ├── # Main pipeline and components  
│   ├── __init__.py  
│   ├── calibration.py  
│   ├── evaluation.py  
│   ├── inference.py  
│   └── pipeline.py  
├── plots/  
│   ├── # Result visualization  
│   ├── __init__.py  
│   └── plots.py  
└── training/  
    ├── # Training and optimization  
    ├── __init__.py  
    ├── fitting.py  
    ├── gridsearch.py  
    └── model_generation.py  

License

This project is licensed under the MIT License. See the LICENSE.txt file for details.

Metadata

Release files for auf 2.0.1

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

Source distribution (sdist)

Source distribution for auf 2.0.1
File Size Uploaded Provenance Actions
auf-2.0.1.tar.gz 89.5 kB Without provenance Details for auf-2.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 200.5 kB

Release files / auf-2.0.1.tar.gz

Download URL auf-2.0.1.tar.gz
Size 89.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c5c6f77debe7adb3fd4e4ab81034c3d870bb5f31780f1c274b9398137fe34978
BLAKE2b-256 checksum
How to use checksums
9978971428296c4ed4e3c7c6e84f4dea8f362286cc5b329513072c655d0c0114
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Release files / auf-2.0.1-py3-none-any.whl

Download URL auf-2.0.1-py3-none-any.whl
Size 111.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f57e9169f4db592df4cf04a09e33ffb7cf2c487ed8b8ee401b7e1dc3d9f81458
BLAKE2b-256 checksum
How to use checksums
7424be15d76f14b282f577342f07b7915a77591f742bc9c03f6e67dbaa783da7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Security for auf 2.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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