{treeheatr}

an R package for interpretable decision tree visualizations

🌳

🔥

Trang Le, Jason Moore

University of Pennsylvania

@trang1618

Your decision tree       may be cool, but what if I tell you
you can make it hot?

🌳

🔥

decision tree + heatmap

rpart.plot

Terry Therneau, Beth Atkinson, Brian Ripley

visNetwork::visTree()

Almende B.V., Benoit Thieurmel , Titouan Robert

partykit::plot.party()

Torsten Hothorn, Heidi Seibold, Achim Zeileis

ggparty

Martin Borkovec, Niyaz Madin, et al.

dtreeviz

(Python)

Terence Parr, Prince Grover

treeheatr

treeheatr::heat_tree(x)

can be of object

  • party (or constparty)
    specifying the precomputed tree
  • partynode 
    specifying the manual tree
  • data.frame (or tibble)
heat_tree(x, target_lab = 'Outcome')

351 blood samples (January 10 - February 18)

3 features:

  • lactic dehydrogenase (LDH)
  • lymphocyte levels
  • high-sensitivity C-reactive protein (hs_CRP)

COVID-19 patient data

heat_tree(x = covid, target_lab = 'Outcome')

data.frame

heat_tree(covid, target_lab = 'Outcome',
	  feats = NA)
split_ldh <- partysplit(1L, breaks = 365)
split_crp <- partysplit(2L, breaks = 41.2)
split_lymp <- partysplit(3L, breaks = 14.7)

custom_tree <- partynode(1L, split = split_ldh , kids = list(
  partynode(2L, split = split_crp, kids = list(
    partynode(3L, info = 'Survival'),
    partynode(4L, split = split_lymp, kids = list(
      partynode(5L, info = 'Death'),
      partynode(6L, info = 'Survival'))))),
  partynode(7L, info = 'Death')))

heat_tree(x = custom_tree, data_test = covid, target_lab = 'Outcome')

Thanks!

@trang1618

Funding

NIH LM010098

NIH AI116794

R packages

ggplot2

partykit

ggparty

heatmaply

People

Jason Moore

Anonymous reviewers

treeheatr: an R package for interpretable decision tree visualizations

By Trang Le

treeheatr: an R package for interpretable decision tree visualizations

R/Medicine 2020 lightning talk https://github.com/trang1618/treeheatr https://trang1618.github.io/treeheatr/

  • 1,611