Metadata-Version: 2.3
Name: caml
Version: 0.0.0.dev4
Summary: Extensions & abstractions of advanced econometric techniques leveraging machine learning.
Author-email: jakepenzak <jakepzak@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Jacob Pieniazek 
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 1 - Planning
Classifier: Programming Language :: Python
Requires-Python: >=3.9
Requires-Dist: doubleml>=0.8.0
Requires-Dist: econml>=0.15.1
Requires-Dist: flaml>=2.2.0
Requires-Dist: ibis-framework[pandas]>=5.1.0
Requires-Dist: typeguard>=4.3.0
Requires-Dist: xgboost>=2.1.1
Provides-Extra: polars
Requires-Dist: ibis-framework[polars]>=5.1.0; extra == 'polars'
Requires-Dist: polars>=0.20.31; extra == 'polars'
Provides-Extra: pyspark
Requires-Dist: flaml[spark]>=2.2.0; extra == 'pyspark'
Requires-Dist: ibis-framework[pyspark]>=5.1.0; extra == 'pyspark'
Requires-Dist: optuna>=3.6.1; extra == 'pyspark'
Requires-Dist: pyspark>=3.5.2; extra == 'pyspark'
Requires-Dist: ray>=2.35.0; extra == 'pyspark'
Description-Content-Type: text/markdown

![](https://img.shields.io/badge/version-0.0.0.dev3-purple)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
![](https://img.shields.io/badge/Lifecycle-Experimental-blue?style=flat)

<h1>
<img src="docs/assets/main_logo.svg" align="center" alt="CaML Logo" height="auto" width=500px/>
</h1>

## Welcome!

CaML = **Ca**usal **M**achine **L**earning

CaML provides a high-level API for an *opinionated* framework in performing Causal ML to estimate Average Treatment Effects (ATEs), Group Average Treatment Effects (GATEs), and Conditional Average Treatment Effects (CATEs), and to provide mechanisms to utilize these models for out of sample prediction & policy prescription. 

The codebase is comprised primarily of extensions & abstractions over top of [EconML](https://github.com/py-why/EconML) & [DoubleML](https://docs.doubleml.org/stable/api/generated/doubleml.datasets.make_confounded_irm_data.html#doubleml.datasets.make_confounded_irm_data) with techniques motivated heavily by [Causal ML Book](https://causalml-book.org/) and additional research. 

## Background
The origins of CaML are rooted in a desire to develop a set of helper tools to abstract and streamline techniques & best pratices in Causal ML/Econometrics for estimating ATEs, GATEs, and CATEs, along with policy prescription.   

As we began working on these helper tools, we begun to see the value in reformulating this framework into a reusable package for wider use amongst the community and to provide an opinionated framework that can be integrated into productionalized systems, particularly experimentation platforms, for efficient estimation of causal parameters for reporting & decision-making purposes.

Admittedly, we were tempted to include the term "Auto" in the name of this package (e.g., AutoCATE, AutoCausal, etc.), but we quickly realized the potential for misapplication & naive usage that could arise from that type of "branding." Indeed, the misapplication of many Causal AI/ML techniques is all too commonplace in the data science community. **All of the standard assumptions for causal inference still apply in order for these tools & techniques to provide unbiased inference.**

Given a key motivation is to provide a tool for productionalized systems, we are building this package with interoperability and extensibility as core values - a key motivation for using [Ibis](https://ibis-project.org/) to ensure we are backend agnostic for end users (e.g., instantiate with a pyspark dataframe and get a pyspark dataframe back). The degree of interoperability will be limited in scope at first, but we hope to expand this as the code base develops. As of now, the tools utilized still rely on in-memory datasets for estimation (via [EconML](https://github.com/py-why/EconML) for causal models & [flaml](https://microsoft.github.io/FLAML/) for AutoML of nuissance functions), but we leverage Ray & Spark for distributing certain processes where appropriate.  

