Skip to main content

A mini package using causal inference for machine learning models

Project description

MiniCausal

logo

MiniCausal is a compact Python library for simple causal analysis, model comparison, and counterfactual estimation. It provides lightweight utilities and example workflows to explore causal effects for classification and regression problems.

Key features

  • Causality tools: compare models using causal metrics and tests.
  • Counterfactuals: generate and evaluate counterfactual explanations.
  • Partial counterfactuals: run targeted counterfactual analyses on subsets of features.
  • Batteries of examples: runnable Jupyter notebooks demonstrating common workflows.

Quick Start

  • Create and activate a virtual environment (PowerShell example):
python -m venv .venv
.\.venv\Scripts\Activate.ps1
  • Install the package:
pip install mini-causal

Examples

This folder contains runnable Jupyter notebooks demonstrating mini_causal features.

Notebooks included

  • causal_models_classifier_example.ipynb — shows how to compare two classification models using mini_causal.causality.
  • mini_causal_causal_counterfactual_example.ipynb — demonstrates the causal_counter counterfactual workflow.
  • mini_causal_prostate_with_partial_counterfactual..ipynb — example using partial_counter on the prostate dataset.

Contributing

See CONTRIBUTING.md for guidelines on reporting issues, opening pull requests, code style, and testing.

License

This project is released under the terms of the MIT License.

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

mini_causal-0.3.5.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

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

mini_causal-0.3.5-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file mini_causal-0.3.5.tar.gz.

File metadata

  • Download URL: mini_causal-0.3.5.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for mini_causal-0.3.5.tar.gz
Algorithm Hash digest
SHA256 bc798e240e54892ab7fb200693d8fc1763118cbd4fe94011a3fddb21ef95b732
MD5 aea25d4d6f6753c8d2baabb172819c66
BLAKE2b-256 068bed855d4f7eb5bfd5722b45090e0433591ff67450c975d0592558710289db

See more details on using hashes here.

File details

Details for the file mini_causal-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: mini_causal-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for mini_causal-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 155770330868759cdf307b7bdcfaf0dadd06b7ae9bdcc79798f8ea10ada7abc0
MD5 04b14277316fc6042cda75ad164f845d
BLAKE2b-256 56e7b3d6b86cbf76f37e3ac7fb086106e4b495c9685a04d78d28cadc18fb1475

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