Production-ready causal attribution and inference API with comprehensive monitoring, testing, and LLM integration
Project description
Statistical Causal Inference
Production-ready causal attribution and inference algorithms for high-performance applications.
Overview
This package provides the core algorithms and statistical methods for causal inference, used by the CausalMMA SDK and other applications.
Features
- Statistical Causal Inference: Advanced algorithms for causal effect estimation
- Causal Discovery: PC Algorithm, FCI, and other structure learning methods
- Optimized Performance: Vectorized operations with NumPy and Numba acceleration
- Async Processing: Efficient asynchronous computation with Dask
- LLM Integration: OpenAI integration for causal reasoning
- Production Ready: Comprehensive error handling and validation
Installation
pip install statistical-causal-inference
From source
git clone https://github.com/rdmurugan/statistical-causal-inference.git
cd statistical-causal-inference
pip install -e .
Usage
from causalinference.core.statistical_inference import StatisticalCausalInference, CausalMethod
from causalinference.core.statistical_methods import PCAlgorithm
import pandas as pd
# Statistical causal inference
sci = StatisticalCausalInference()
result = sci.estimate_causal_effect(
data=df,
treatment='treatment_column',
outcome='outcome_column',
method=CausalMethod.DOUBLY_ROBUST
)
# Causal discovery
pc = PCAlgorithm()
dag = pc.learn_structure(data=df)
Core Modules
statistical_inference.py- Causal effect estimation methodsstatistical_methods.py- PC Algorithm and other statistical methodscausal_discovery.py- Structure learning algorithmsoptimized_algorithms.py- Performance-optimized implementationsasync_processing.py- Asynchronous computation utilitiesllm_client.py- LLM integration for causal reasoning
Requirements
- Python >= 3.9
- NumPy >= 1.21.0
- Pandas >= 1.3.0
- Scikit-learn >= 1.0.0
- NetworkX >= 2.6.0
- SciPy >= 1.7.0
Development
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/
# Format code
black causalinference/
License
Proprietary - For use in CausalMMA projects
Contact
For questions or support, contact: durai@infinidatum.net
Version
Current version: 4.4.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file statistical_causal_inference-4.4.0.tar.gz.
File metadata
- Download URL: statistical_causal_inference-4.4.0.tar.gz
- Upload date:
- Size: 72.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bce29b8abdab46e0368d74bb3bcb164e0f49d8a0c2bc16bab9d22a086a703728
|
|
| MD5 |
cd7da74e1ca4de7ab1a6a80261311eeb
|
|
| BLAKE2b-256 |
9e7c9ba8fadfc878bc7c76ca12758f7d3217bd1b0d7f5789987a052086cf9a7c
|
File details
Details for the file statistical_causal_inference-4.4.0-py3-none-any.whl.
File metadata
- Download URL: statistical_causal_inference-4.4.0-py3-none-any.whl
- Upload date:
- Size: 83.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
858b4469ad8b8c38039262dd6007d52d5987f13386a593082bf9c41df030c1ec
|
|
| MD5 |
7d2d0c5a32a7af15136d2b3b68e7176a
|
|
| BLAKE2b-256 |
ef533266144d407b955066e182a5d29b432822b85fa69d827bb71d3f06ca8789
|