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.1.tar.gz (47.1 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.1-py3-none-any.whl (39.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mini_causal-0.4.1.tar.gz
  • Upload date:
  • Size: 47.1 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.1.tar.gz
Algorithm Hash digest
SHA256 83fea7ac8483c05fab8b541454e78b1875f93b973595b352b014b082170c5916
MD5 6a54be2049df216e2fd554a9b3cdf527
BLAKE2b-256 908d2fb8e572f1dd66e6f728744d7cf67d2976d5a30bbfe7f4e9ae8662a93c9c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mini_causal-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 39.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 47476753d4e1020d181a6784d6ef75cd4fd79c376119b8fda3fd49bf8288011c
MD5 e49733240b59f10327b5be62e4e9501c
BLAKE2b-256 e5f868775babec6e4436b4e1c701bb8fc04171552c3e6ed4624d8c3cfc2246c2

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