PyRank
  • Search
  • PyPI
  • GitHub
  • Insights
  • Compare
  • Advisories
  • Ecosystem
  • About

Counterfactual Explanations Python Packages

Python packages with the GitHub topic counterfactual-explanations. Sorted by monthly downloads, with stars and forks.
guillermo-navas-palencia
optbinning

Optimal binning: monotonic binning with constraints. Support batch & stream optimal binning. Scorecard modelling and counterfactual explanations.

180K 532 118
interpretml
dice-ml

Generate Diverse Counterfactual Explanations for any machine learning model.

26K 2K 235
wlazlod
treecf

Constrained, threshold-aware counterfactual explanations for tree ensembles (XGBoost, LightGBM, CatBoost, sklearn) on a bundled Rust engine

2K 2 0
sbobek
acfx

Actionable Counterfactual eXplanations

1K 2 1
javiermartinch
dicex

DiCEx: Directional counterfactual explanations

728 0 0
b-bayrak
ceval

CEval is a Python package for evaluating the quality of counterfactual explanations produced by any post-hoc XAI (Explainable AI) method. It computes 14 established metrics with a single call and works with diverse model architecture.

500 0 1
Samsung
langgraph-goat

Online explainability for LangGraph agents through counterfactual planning and reasoning provenance graphs.

404 22 0
birkhoffg
cfnet

Recourse Explanation Library in JAX

332 2 1
rmazzine
cfnow

Easiest way to generate counterfactual explanations

213 11 0
andreArtelt
ceml

CEML - Counterfactuals for Explaining Machine Learning models - A Python toolbox

204 47 13
BogdanTurbal
ellice

An efficient + provably robust implementation of algorithmic recourse via Rashomon sets in PyTorch & Scikit-Learn (NeurIPS '25 Spotlight)

179 2 0
sbobek
lux-explainer

Local Universal Rule-based Explanations

168 13 6
carla-recourse
carla-recourse

CARLA: A Python Library to Benchmark Algorithmic Recourse and Counterfactual Explanation Algorithms

152 306 64
xiaohk
gamcoach

Personal coach to help you obtain desired AI decisions!

150 19 3
swarna-kpaul
genfact

Counterfactual causal analysis

145 1 2
kuppireddybhageerathareddy1110
aizenx-xai

AizenX is an open-source Explainable AI (XAI) framework for model interpretation, counterfactual analysis, bias detection, and visualization.

103 0 0
kesjien
wavexplain

Counterfactual attribution for multi-series time-series forecasters, explain why a forecast is what it is, with contributions that sum exactly to the prediction.

100 5 0
wmonteiro92
xmoai

xMOAI 🗿

51 2 0
wangyongjie-ntu
cfai

A collection of algorithms of counterfactual explanations.

34 52 9
swarna-kpaul
genfact-swarna-kpaul

Counterfactual causal analysis

0 1 2
    • Original data from PyPI, GitHub, and OSV; downloads served through ClickHouse
    • Sources & methodology