WoodTapper: a Python package for explaining decision tree ensembles

WoodTapper: a Python package for explaining decision tree ensembles - Published in JOSS (2026)

https://github.com/artefactory/woodtapper

Science Score: 87.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

classification machine-learning regression research-center tabular-data
Last synced: 2 months ago · JSON representation

Repository

WoodTapper — a Python toolbox for interpretable and explainable tree ensembles.

Basic Info
Statistics
  • Stars: 36
  • Watchers: 1
  • Forks: 4
  • Open Issues: 2
  • Releases: 6
Topics
classification machine-learning regression research-center tabular-data
Created about 1 year ago · Last pushed 2 months ago
Metadata Files
Readme Contributing License

README.md

*User-friendly Python toolbox for interpreting and manipulating decision tree ensembles from scikit-learn* [![CI Status](https://github.com/artefactory/woodtapper/actions/workflows/ci.yaml/badge.svg)](https://github.com/artefactory/woodtapper/actions/workflows/ci.yaml?query=branch%3Amain) [![Linting , formatting, imports sorting: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-informational?logo=pre-commit&logoColor=white)](https://github.com/artefactory/woodtapper/blob/main/.pre-commit-config.yaml) [![Docs](https://img.shields.io/badge/docs-online-blue)](#-documentation) [![License](https://img.shields.io/github/license/artefactory/woodtapper)](LICENSE) [![Python Versions](https://img.shields.io/pypi/pyversions/woodtapper?label=python)](https://pypi.org/project/woodtapper/) [![PyPI Version](https://img.shields.io/pypi/v/woodtapper.svg)](https://pypi.org/project/woodtapper/) [![status](https://joss.theoj.org/papers/4a4e11dc5d6fb657d3bd74bd7bd3f8e9/status.svg)](https://joss.theoj.org/papers/4a4e11dc5d6fb657d3bd74bd7bd3f8e9)

🪵 Key Features

WoodTapper is a Python toolbox that provides:

  • Rule extraction from tree-based ensembles: Generates a final estimator composed of a sequence of simple rule-based on features and thresholds.

  • Example-based explanations: Connects predictions to a small set of representative samples, returning the most similar examples along with their target values.

Detailed information about the modules can be found here.

WoodTapper is fully compatible with scikit-learn tree ensemble models.

🛠 Installation

From PyPi: bash pip install woodtapper

Warning (scikit-learn already installed): If you install woodtapper in an environment where scikit-learn is already present, the prebuilt PyPI wheel may not be compatible with your existing scikit-learn binary. In that case, reinstall woodtapper from source so it is compiled against the scikit-learn version in your environment:

bash pip uninstall -y woodtapper pip install -U pip setuptools wheel pip install -U Cython pybind11 pip install --no-binary=woodtapper --no-build-isolation woodtapper

From source: bash git clone https://github.com/artefactory/woodtapper.git cd woodtapper pip install -e .[dev,docs]

Warning: If you are a Windows user, you need to have a C/C++ compiler before installing woodtapper.

🌿 WoodTapper RulesExtraction module

```python from woodtapper.extractrules import SirusClassifier from woodtapper.extractrules.visualization import show_rules

sirus = SirusClassifier(nestimators=1000, maxdepth=2, quantile=10, p0=0.01, randomstate=0) sirus.fit(Xtrain, ytrain) ypredsirus = sirus.predict(Xtest) showrules(sirus, maxrules=10) ```

🌱 WoodTapper ExampleExplanation module

```python from woodtapper.example_sampling import RandomForestClassifierExplained

rfexplained = RandomForestClassifierExplained(nestimators=100) rfexplained.fit(Xtrain, y_train)

Get the 5 most similar samples (and target) for each test sample

Xyexplain = rfexplained.explanation(X_test) ```

🙏 Acknowledgements

This work was done through a partnership between the Artefact Research Center and the Laboratoire de Probabilités Statistiques et Modélisation (LPSM) of Sorbonne University.

   

📜 Citation

If you find the code useful, please consider citing us:

bibtex @misc{woodtapper, title = {WoodTapper: a Python package for explaining decision tree ensembles}, author = {Sakho, Abdoulaye and Aouad, Jad and Gauthier, Carl-Erik and Malherbe, Emmanuel and Scornet, Erwan}, year = {2025}, howpublished = {\url{https://github.com/artefactory/woodtapper}}, } For SIRUS methodology, consider citing: bibtex @article{benard2021sirus, title={Sirus: Stable and interpretable rule set for classification}, author={Benard, Clement and Biau, Gerard and Da Veiga, Sebastien and Scornet, Erwan}, year={2021} }

Owner

  • Name: artefactory
  • Login: artefactory
  • Kind: organization

JOSS Publication

WoodTapper: a Python package for explaining decision tree ensembles
Published
May 05, 2026
Volume 11, Issue 121, Page 10112
Authors
Abdoulaye Sakho ORCID
Artefact Research Center, Paris, France, Laboratoire de Probabilités, Statistique et Modélisation Sorbonne Université and Université Paris Cité, CNRS, F-75005, Paris
Jad Aouad ORCID
Artefact Research Center, Paris, France
Carl-Erik Gauthier ORCID
Société Générale, Paris, France
Emmanuel Malherbe ORCID
Artefact Research Center, Paris, France
Erwan Scornet ORCID
Laboratoire de Probabilités, Statistique et Modélisation Sorbonne Université and Université Paris Cité, CNRS, F-75005, Paris
Editor
Fangzhou Xie ORCID
Tags
Machine Learning XAI

GitHub Events

Total
  • Delete event: 12
  • Pull request event: 12
  • Fork event: 1
  • Issues event: 1
  • Watch event: 16
  • Issue comment event: 8
  • Push event: 109
  • Pull request review event: 7
  • Pull request review comment event: 29
  • Create event: 12
Last Year
  • Delete event: 12
  • Pull request event: 12
  • Fork event: 1
  • Issues event: 1
  • Watch event: 16
  • Issue comment event: 8
  • Push event: 109
  • Pull request review event: 7
  • Pull request review comment event: 29
  • Create event: 12

Issues and Pull Requests

Last synced: 2 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 19 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
  • Total maintainers: 1
pypi.org: woodtapper

A Python toolbox for interpretable and explainable tree ensembles.

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 19 Last month
Rankings
Dependent packages count: 8.4%
Average: 27.9%
Dependent repos count: 47.4%
Maintainers (1)
Last synced: 3 months ago

Dependencies

.github/workflows/ci.yaml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • actions/upload-artifact v4 composite
.github/workflows/deploy_docs.yaml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/deploy_on_pypitest.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
pyproject.toml pypi
requirements.txt pypi
  • cython ==3.1.2
  • matplotlib ==3.10.0
  • mkdocs ==1.6.1
  • mkdocs-material ==9.6.22
  • mkdocstrings-python ==1.18.2
  • numpy ==2.3.1
  • pandas ==2.3.0
  • pre-commit ==4.3.0
  • pytest ==8.4.2
  • pytest-cov ==7.0.0
  • scikit-learn ==1.6.1
  • setuptools ==78.1.1
  • ucimlrepo ==0.0.7
setup.py pypi