Package: parttree 0.1.3

Grant McDermott

parttree: Visualize Simple 2-D Decision Tree Partitions

Visualize the partitions of simple decision trees, involving one or two predictors, on the scale of the original data. Provides an intuitive alternative to traditional tree diagrams, by visualizing how a decision tree divides the predictor space in a simple 2D plot alongside the original data. The 'parttree' package supports both classification and regression trees from 'rpart' and 'partykit', as well as trees produced by popular frontend systems like 'tidymodels' and 'mlr3'. Visualization methods are provided for both base R graphics and 'ggplot2'.

Authors:Grant McDermott [aut, cre], Achim Zeileis [ctb], Brian Heseung Kim [ctb], Julia Silge [ctb]

parttree_0.1.3.tar.gz
parttree_0.1.3.zip(r-4.7-any)parttree_0.1.3.zip(r-4.6-any)parttree_0.1.3.zip(r-4.5-any)
parttree_0.1.3.tgz(r-4.6-any)parttree_0.1.3.tgz(r-4.5-any)
parttree_0.1.3.tar.gz(r-4.7-any)parttree_0.1.3.tar.gz(r-4.6-any)
parttree_0.1.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
parttree/json (API)

# Install 'parttree' in R:
install.packages('parttree', repos = c('https://grantmcdermott.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/grantmcdermott/parttree/issues

Pkgdown/docs site:https://grantmcdermott.com

On CRAN:

Conda:

7.78 score 101 stars 100 scripts 360 downloads 2 exports 15 dependencies

Last updated from:57786efd60. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK161
source / vignettesOK244
linux-releaseOK154
macos-releaseOK103
macos-oldrelOK107
windows-develOK81
windows-releaseOK100
windows-oldrelOK101
wasm-releaseOK137

Exports:geom_parttreeparttree

Dependencies:data.tableFormulainumlatticelibcoinMatrixmvtnormpartykitrlangrpartsandwichstrucchangesurvivaltinyplotzoo

Abstract art with parttree and friends
Background | Example 1: Peale's "Portrait of Rosalba" | Example 2: parttree logo | Postscript

Last update: 2026-01-15
Started: 2023-01-04

Introduction to parttree
Motivating example: Classifying penguin species | Continuous predictions | Supported model classes | ggplot2 | Gotcha: (gg)plot orientation

Last update: 2025-01-16
Started: 2023-01-02

Readme and manuals

Help Manual

Help pageTopics
Visualize tree partitions with ggplot2geom_parttree
Convert a decision tree into a data frame of partition coordinatesparttree parttree.constparty parttree.LearnerClassifRpart parttree.LearnerRegrRpart parttree.rpart parttree.workflow parttree._rpart
Plot decision tree partitionsplot.parttree