Skip to main content

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 methods
  • statistical_methods.py - PC Algorithm and other statistical methods
  • causal_discovery.py - Structure learning algorithms
  • optimized_algorithms.py - Performance-optimized implementations
  • async_processing.py - Asynchronous computation utilities
  • llm_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

statistical_causal_inference-4.4.0.tar.gz (72.7 kB view details)

Uploaded Source

Built Distribution

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

statistical_causal_inference-4.4.0-py3-none-any.whl (83.4 kB view details)

Uploaded Python 3

File details

Details for the file statistical_causal_inference-4.4.0.tar.gz.

File metadata

File hashes

Hashes for statistical_causal_inference-4.4.0.tar.gz
Algorithm Hash digest
SHA256 bce29b8abdab46e0368d74bb3bcb164e0f49d8a0c2bc16bab9d22a086a703728
MD5 cd7da74e1ca4de7ab1a6a80261311eeb
BLAKE2b-256 9e7c9ba8fadfc878bc7c76ca12758f7d3217bd1b0d7f5789987a052086cf9a7c

See more details on using hashes here.

File details

Details for the file statistical_causal_inference-4.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for statistical_causal_inference-4.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 858b4469ad8b8c38039262dd6007d52d5987f13386a593082bf9c41df030c1ec
MD5 7d2d0c5a32a7af15136d2b3b68e7176a
BLAKE2b-256 ef533266144d407b955066e182a5d29b432822b85fa69d827bb71d3f06ca8789

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