Metadata-Version: 2.1
Name: hypex
Version: 0.0.3.1
Summary: Fast and customizable framework for Causal Inference
Home-page: https://github.com/sb-ai-lab/HypEx
License: Apache-2.0
Author: Dmitry Tikhomirov
Author-email: dimasta00@gmail.com
Requires-Python: >=3.8,<3.11
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Typing :: Typed
Requires-Dist: faiss-cpu (>=1.6.0,<=1.7.4)
Requires-Dist: matplotlib (>=3.0.0,<=3.7.3) ; python_version < "3.9"
Requires-Dist: matplotlib (>=3.0.0,<=3.8.1) ; python_version >= "3.9" and python_version < "3.11"
Requires-Dist: numpy (>=1.17.0,<=1.24.4) ; python_version < "3.9"
Requires-Dist: numpy (>=1.17.0,<=1.26.1) ; python_version >= "3.9"
Requires-Dist: pandas (>=1.3.5,<=2.0.3) ; python_version < "3.9"
Requires-Dist: pandas (>=1.3.5,<=2.1.2) ; python_version >= "3.9"
Requires-Dist: scikit-learn
Requires-Dist: scipy (>=1.5.0,<=1.10.1) ; python_version < "3.9"
Requires-Dist: scipy (>=1.5.0,<=1.11.3) ; python_version >= "3.9" and python_version < "3.11"
Requires-Dist: tqdm
Project-URL: Repository, https://github.com/sb-ai-lab/HypEx
Description-Content-Type: text/markdown

# HypEx: Streamlined Causal Inference and AB Testing

[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-2ba2d9.svg)](https://t.me/hypexchat)

## Introduction

HypEx (Hypotheses and Experiments) is a comprehensive library crafted to streamline the causal inference and AB testing
processes in data analytics. Developed for efficiency and effectiveness, HypEx employs Rubin's Causal Model (RCM) for
matching closely related pairs, ensuring equitable group comparisons when estimating treatment effects.

Boasting a fully automated pipeline, HypEx adeptly calculates the Average Treatment Effect (ATE), Average Treatment
Effect on the Treated (ATT), and Average Treatment Effect on the Control (ATC). It offers a standardized interface for
executing these estimations, providing insights into the impact of interventions across various population subgroups.

Beyond causal inference, HypEx is equipped with robust AB testing tools, including Difference-in-Differences (
Diff-in-Diff) and CUPED methods, to rigorously test hypotheses and validate experimental results.

## Features

- **Faiss KNN Matching**: Utilizes Faiss for efficient and precise nearest neighbor searches, aligning with RCM for
  optimal pair matching.
- **Data Filters**: Built-in outlier and Spearman filters ensure data quality for matching.
- **Result Validation**: Offers multiple validation methods, including random treatment, feature, and subset
  validations.
- **Data Tests**: Incorporates SMD, KS, PSI, and Repeats tests to affirm the robustness of effect estimations.
- **Automated Feature Selection**: Employs LGBM feature selection to pinpoint the most impactful features for causal
  analysis.
- **AB Testing Suite**: Features a suite of AB testing tools for comprehensive hypothesis evaluation.

## Quick Start

Explore usage examples and tutorials [here](https://github.com/sb-ai-lab/Hypex/blob/master/examples/tutorials/).

## Installation

```bash
pip install hypex
```

## Quick Example

```python
from hypex import Matcher

# Define your data and parameters
data = pd.DataFrame()
treatment_column = "treatment"
outcome_column = ['target1', 'target2']

# Create and run the experiment
matcher = Matcher(data, treatment_column, outcome_column)
results, quality_results, df_matcher = matcher.estimate()
```

## Documentation

For more detailed information about the library and its features, visit
our [documentation on ReadTheDocs](https://hypex.readthedocs.io/en/latest/).

You'll find comprehensive guides and tutorials that will help you get started with HypEx, as well as detailed API
documentation for advanced use cases.

## Conclusion

HypEx stands as an indispensable resource for data analysts and researchers delving into causal inference and AB
testing. With its automated capabilities, sophisticated matching techniques, and thorough validation procedures, HypEx
is poised to unravel causal relationships in complex datasets with unprecedented speed and precision.

