Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Examples

You can build a conditional tree using ctree from the party package:

[width=0.8]rplot-ctree


library("party")
load("wine.Rdata")
wine.ctree <- ctree(Type ~ ., data=wine)
pdf("graphics/rplot-ctree.pdf")
  plot(wine.ctree)
dev.off()

http://rattle.togaware.com/code/rplot-ctree.R



> wine.ctree

           Conditional tree with 5 terminal nodes

  Response:  Type
  Inputs:  Alcohol, Malic, Ash, Alcalinity, Magnesium, Phenols, 
           Flavanoids, Nonflavanoids, Proanthocyanins, Color, 
           Hue, Dilution, Proline
  Number of observations:  178

  1) Flavanoids <= 1.57; criterion = 1, statistic = 127.131
    2) Hue <= 0.89; criterion = 1, statistic = 36.136
      3)*  weights = 47
    2) Hue > 0.89
      4)*  weights = 15
  1) Flavanoids > 1.57
    5) Proline <= 714; criterion = 1, statistic = 82.158
      6)*  weights = 54
    5) Proline > 714
      7) Alcohol <= 13.05; criterion = 1, statistic = 20.638
        8)*  weights = 10
      7) Alcohol > 13.05
        9)*  weights = 52



Copyright © 2004-2006 [email protected]
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.