Skip to main content

A Python toolbox for interpretable and explainable tree ensembles.

Project description

User-friendly and scalable Python package for tapping decision tree ensembles

Linting , formatting, imports sorting: ruff

WoodTapper is a Python toolbox for interpretable and explainable tree ensembles learning, fully compatible with the scikit-learn API. WoodTapper enables seamless integration of interpretable rule extraction into existing machine learning workflows. In addition, it introduces an example-based explanation module that links predictions to a small set of representative samples.

🌳 Installation

From TestPypi:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ woodtapper

From Source: Clone the repository:

git clone git@github.com:artefactory/mgs-grf.git

And install the required packages into your environment (conda, mamba or pip):

pip install -r requirements.txt

Then run the following command from the repository root directory :

pip install -e .[dev]

🚀 How to use WoodTapper

## RandomForestClassifier rules extraction
from extract_rules.extractors import SirusClassifier

SIRUS = SirusClassifier(n_estimators=1000,max_depth=2,
                          quantile=10,p0=0.01, random_state=0)
SIRUS.fit(X_train,y_train)
y_pred_sirus = SIRUS.predict(X_test)

🙏 Acknowledgements

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

   

📜 Citation

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

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

woodtapper-0.0.6.tar.gz (390.1 kB view details)

Uploaded Source

File details

Details for the file woodtapper-0.0.6.tar.gz.

File metadata

  • Download URL: woodtapper-0.0.6.tar.gz
  • Upload date:
  • Size: 390.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for woodtapper-0.0.6.tar.gz
Algorithm Hash digest
SHA256 a08cd004243edb2c2373a166ee44e05123102d1cef635fe16ab4d687ad0db885
MD5 0348e32d4de35b6c9ddd4ff9b2cef566
BLAKE2b-256 ac6718b28871b82d456020e6dcd50038945a1e94f7a13448ae7775e557d654c7

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