Interactive decision trees with Microsoft R

[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Even though ensembles of trees (random forests and the like) generally have better predictive power and robustness, fitting a single decision tree to data can often be very useful for:

  • understanding the important variables in a data set
  • exploring unusual subsegments of the data (and the explanatory variables that define them)
  • presenting a simple, decision-based model to management to explain behaviors in data
  • illustrating a model graphically

But to get the best out of a decision tree, you need to be able to look at it, interact with it, and able to present it attractively. This blog post by Longhow Lam demonstrates the interactive tree viewer in Microsoft R, which lets you explore the individual nodes and breakpoints in the fitted tree, which can be embedded on a web page or printed in a report. Click on the screenshot below (from an analysis of the Titanic survivor data set) to try it out.

Revotreeview

You can create interactive trees like this in Microsoft R Client (available free) or Microsoft R Server using the createTreeView function. 

For more on the uses and benefits of single trees, check out Longhow Lam's blog post linked below.

Longhow Lam's Blog: Don’t give up on single trees yet…. An interactive tree with Microsoft R

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)