Metadata-Version: 2.4
Name: caml
Version: 0.0.0.dev11
Summary: Extensions & abstractions of advanced econometric techniques leveraging machine learning.
Author-email: jakepenzak <jacob@pieniazek.me>
License: # MIT 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.
        
        # Third-Party Software
        
        This project includes third-party software licensed under different terms, specifically the BSD 3-Clause License.
        
        ## BSD 3-Clause License for DoubleML
        
        Copyright (c) 2019-2023 Philipp Bach, Victor Chernozhukov, Sven Klaassen, Malte S. Kurz, Martin Spindler
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        * Redistributions of source code must retain the above copyright notice, this
          list of conditions and the following disclaimer.
        
        * Redistributions in binary form must reproduce the above copyright notice,
          this list of conditions and the following disclaimer in the documentation
          and/or other materials provided with the distribution.
        
        * Neither the name of the copyright holder nor the names of its
          contributors may be used to endorse or promote products derived from
          this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Classifier: Development Status :: 1 - Planning
Classifier: Programming Language :: Python
Requires-Python: >=3.10
Requires-Dist: doubleml>=0.8.0
Requires-Dist: econml>=0.15.1
Requires-Dist: flaml[automl]>=2.2.0
Requires-Dist: matplotlib>=3.9.2
Requires-Dist: patsy>=1.0.1
Requires-Dist: rich>=13.9.4
Requires-Dist: typeguard>=4.3.0
Provides-Extra: jax
Requires-Dist: jax>=0.5.2; extra == 'jax'
Provides-Extra: jax-gpu
Requires-Dist: jax[cuda12]>=0.5.2; extra == 'jax-gpu'
Provides-Extra: polars
Requires-Dist: polars>=1.17.1; extra == 'polars'
Requires-Dist: pyarrow>=20.0.0; extra == 'polars'
Provides-Extra: pyspark
Requires-Dist: flaml[spark]>=2.2.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

<div align="center">

<img src="https://raw.githubusercontent.com/jakepenzak/caml/main/docs/assets/main_logo.svg" align="center" alt="CaML Logo" height="auto" width=500px/>

<br>
<br>

[![image](https://img.shields.io/pypi/v/caml.svg)](https://pypi.python.org/pypi/caml)
[![lifecycle](https://img.shields.io/badge/Lifecycle-Experimental-blue?style=flat)](https://img.shields.io/badge/Lifecycle-Experimental-blue?style=flat)
[![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)
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
<br>
[![Caml CI/CD](https://github.com/jakepenzak/caml/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/jakepenzak/caml/actions/workflows/ci.yml)
[![Build & Publish Docs](https://github.com/jakepenzak/caml/actions/workflows/docs.yml/badge.svg)](https://github.com/jakepenzak/caml/actions/workflows/docs.yml)
[![Pre-Commit & Linting Checks](https://github.com/jakepenzak/caml/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/jakepenzak/caml/actions/workflows/lint.yml)
<br>
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/cd6cc54c704e4a7aafe20f851bc39236)](https://app.codacy.com/gh/jakepenzak/caml/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/cd6cc54c704e4a7aafe20f851bc39236)](https://app.codacy.com/gh/jakepenzak/caml/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)

**Ca**usal **M**achine **L**earning

</div>

## Welcome!

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 validation, 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. In
addition, we seek to provide a framework for validating & scoring these models on out of sample data to help
set the foundations for an AutoML framework for CATE models.

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.

**All of the standard assumptions for causal inference still apply in order for these tools & techniques to provide
unbiased inference.** A great resource for the CausalML landscape is the [CausalML book](https://www.causalml-book.org/) written and
publicly available generously by V. Chernozhukov, C. Hansen, N. Kallus, M. Spindler, & V. Syrgkanis.

Given a key motivation is to provide a tool for productionalized systems, we are building this package with interoperability
and extensibility as core values. 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 and if available for the user.
