Skip to main content

AUF — Auto Uplift Framework

Project description

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.

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

auf-2.0.1.tar.gz (89.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auf-2.0.1-py3-none-any.whl (111.0 kB view details)

Uploaded Python 3

File details

Details for the file auf-2.0.1.tar.gz.

File metadata

  • Download URL: auf-2.0.1.tar.gz
  • Upload date:
  • Size: 89.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for auf-2.0.1.tar.gz
Algorithm Hash digest
SHA256 c5c6f77debe7adb3fd4e4ab81034c3d870bb5f31780f1c274b9398137fe34978
MD5 dca378cfaa9ef411a9776813a42a051e
BLAKE2b-256 9978971428296c4ed4e3c7c6e84f4dea8f362286cc5b329513072c655d0c0114

See more details on using hashes here.

File details

Details for the file auf-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: auf-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 111.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for auf-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f57e9169f4db592df4cf04a09e33ffb7cf2c487ed8b8ee401b7e1dc3d9f81458
MD5 de47d7c8124149eb837b415cc2ae1e8f
BLAKE2b-256 7424be15d76f14b282f577342f07b7915a77591f742bc9c03f6e67dbaa783da7

See more details on using hashes here.

Supported by

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