# parrt/dtreeviz

A python library for decision tree visualization and model interpretation.

Repository: https://github.com/parrt/dtreeviz
Canonical: https://ross.abutalabs.com/products/dtreeviz
Language: Jupyter Notebook
License: MIT
License Family: permissive
Topics: machine-learning, scikit-learn, python, data-science, xgboost, decision-trees, visualization, random-forest, model-interpretation
Last push: 2026-01-02T18:39:55+00:00

## Health v2 (maintenance only)
Score: 69/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 60, release rhythm 63, longevity 100
- inputs: {"age_days": 2942, "days_push": 243, "days_rel": 249, "gap_med": 0, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3155, forks 338 (observed 2026-08-28T04:07:46.311118+00:00)

## What it is
dtreeviz is a Python library for visualizing decision trees and interpreting tree-based machine learning models. It supports scikit-learn, XGBoost, LightGBM, Spark MLlib, and TensorFlow Decision Forests, producing rich SVG visualizations of trees, prediction paths, and leaf information.

## Use cases
- visualize a decision tree from scikit-learn
- explain a single prediction path in a random forest
- interpret an XGBoost gradient boosting model
- plot decision tree structure for teaching machine learning
- explore feature space of a regression tree
- visualize LightGBM or Spark MLlib trees

## When to choose
- you need detailed, publication-quality decision tree visualizations
- you want to explain individual predictions from tree ensembles
- you work with scikit-learn, XGBoost, LightGBM, Spark, or TensorFlow decision forests in Python

## When to avoid
- you need visualization of non-tree-based models like neural networks
- you want a lightweight text-only tree dump rather than rich graphics
- your project is not in Python

## Facets
- artifact type: library
- maturity: active
- function: data-visualization, machine-learning
- domain: machine-learning, data-science, data-visualization
- platform: python
- tags: decision-trees, scikit-learn, xgboost, lightgbm, random-forest, model-interpretation, explainability

## Member repositories
- parrt/dtreeviz (main) score 69

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:46.311118+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:25:39.755204+00:00, confidence not recorded.
  - readme: https://github.com/parrt/dtreeviz (fetched 2026-08-28T04:07:46.311118+00:00, sha 13f5ebe25db1)
  - registry_pypi: https://pypi.org/pypi/dtreeviz/json (fetched 2026-08-29T09:40:09.586282+00:00, sha 49ed87aa2fe5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
