Skip to main content

A causal machine learning framework that measures the impact of features on the performance of 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.4.12.tar.gz (46.2 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.4.12-py3-none-any.whl (38.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mini_causal-0.4.12.tar.gz
  • Upload date:
  • Size: 46.2 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.4.12.tar.gz
Algorithm Hash digest
SHA256 62ff491f95f45bceba6978f7db8c00038e31a57a4d560ccd1b8574cc15b9ee00
MD5 3d52eda158d4b0c918fa8035ad5b6d56
BLAKE2b-256 82bce3cbe8c3c27748222ee68e683d7a8dc69c3e1ef4c89d82f42e62af9b3e91

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mini_causal-0.4.12-py3-none-any.whl
  • Upload date:
  • Size: 38.7 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.4.12-py3-none-any.whl
Algorithm Hash digest
SHA256 b2a83947a9d4fdb613a844f4d1b36d76c45299025af2d4dbf71e90f827e1f651
MD5 6bd5c091e17c629927cf07bc6501aff3
BLAKE2b-256 ffc1cbf740a93a56411583cec05850cc4869d855ae6ad7360bfa1cf30b248cdf

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