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.11.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.11-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mini_causal-0.4.11.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.11.tar.gz
Algorithm Hash digest
SHA256 ee91598072b2af4bcf1751ae71c3fd1abb92966a188b150048369beb945824ef
MD5 ad85fcabd76c7a1a480000266e3cd5ac
BLAKE2b-256 16840bcc4185dce16fd5392b8e176bb9f091127baa4b64977b663a66893baba3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mini_causal-0.4.11-py3-none-any.whl
  • Upload date:
  • Size: 39.1 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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 36f73bd3a1cd7d4a98a75306f16914171ef26c2c850cb1fc263bafb03ac811b3
MD5 5820040f94537197a7de98ecacb6d192
BLAKE2b-256 c757207672f7fcdc2ff97164c3617dac0f244b116e22fe1c681f76eeeb97a63e

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