Skip to main content

CCPFN: Causal Foundation Model for Continuous Treatments

Project description

Causal Foundation Models with Continuous Treatments

arxiv huggingface

This is the repository for inference with CCPFN (Continuous Causal Prior-Fitted Network), a causal foundation model for use in domains with a continuous treatment variable. This is the inference repository; the full research reposistory (including training code and our prior) is forthcoming.

Quick Start

Install with pip:

pip install ccpfn

Model weights are available on Hugging Face and will be automatically downloaded on first use.

To install from source, ensure you have Python ≥3.10. Then run the following:

git clone https://github.com/layer6ai-labs/CCPFN-inference.git
cd CCPFN-inference
pip install -e .

Example notebooks on CCPFN usage, including individual treatment-response curve reconstruction tasks, can be found in the notebooks directory.

Overview

CCPFN uses in-context learning (ICL) to estimate the effects of a continuously-varying treatment (for example, the dosage of a medication, or the sensitivity of economic outcomes to prices or rates). Specifically, it estimates the conditional expected potential outcome (CEPO), defined as $𝔼[Y(t) \mid X = x]$. Observational (historic) data is supplied as context, and queries are passed at inference time. No further training is required.

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

ccpfn-0.1.0.tar.gz (130.2 kB view details)

Uploaded Source

Built Distribution

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

ccpfn-0.1.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file ccpfn-0.1.0.tar.gz.

File metadata

  • Download URL: ccpfn-0.1.0.tar.gz
  • Upload date:
  • Size: 130.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for ccpfn-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e1c844be5afc94ef93fc1b972911edbee88f96dcdf1d84f55ccb066a75068e81
MD5 8b2314fe68fdd1237ff49a0022873084
BLAKE2b-256 df04ffc74dd3f26facd9819b9d8a6abe72d60b45b17dbb56f517f88877cabb85

See more details on using hashes here.

File details

Details for the file ccpfn-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ccpfn-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for ccpfn-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 247520c06e62e1b4a98d5db5bb48b87950e73b628cade89ac538541d9b231a31
MD5 69055310159b900f0173ef38941b2b1c
BLAKE2b-256 ce9d2fe26e5c6a319676e8c46f3e511814bdd03bd0a40a529c9c96a91f6a343b

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