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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mini_causal-0.3.3.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.3.tar.gz
Algorithm Hash digest
SHA256 b4bfb504c0e61dd5e5cd6be5a903735798198d8584bbcbd659721a49e560d395
MD5 73fc8777f4b7b43efbb907ccbe01103f
BLAKE2b-256 a2855cbda96bc98328b1369efb51a28bf94dc30e99a6dc606a39f3afd56465ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mini_causal-0.3.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3101c6e20856bfc8d3f8c7f975627366b4dded4be59adbcf172de813c560f51f
MD5 ab355026fb3587a2521014aa862fd4c3
BLAKE2b-256 bf86bf8382002af8ffb756ce46be6f71eca09916b202924b2d915688d920f6e1

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