11.07.2015 Views

Preface to First Edition - lib

Preface to First Edition - lib

Preface to First Edition - lib

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ANALYSIS USING R 167R> plot(as.party(bodyfat_prune), tp_args = list(id = FALSE))1waistcirc2hipcirc< 88.4 >= 88.45kneebreadth< 96.25 >= 96.256hipcirc< 11.15 >= 11.15< 109.9 >= 109.9n = 17n = 23n = 13n = 15n = 3605040302010605040302010605040302010605040302010605040302010Figure 9.2Pruned regression tree for body fat data.Given this model, one can predict the (unknown, in real circumstances)body fat content based on the covariate measurements. Here, using the knownvalues of the response variable, we compare the model predictions with theactually measured body fat as shown in Figure 9.3. The three observationswith large body fat measurements in the rightmost terminal node can beidentified easily.9.3.2 Glaucoma DiagnosisWe start with a large initial tree and prune back branches according <strong>to</strong>the cross-validation criterion. The default is <strong>to</strong> use 10 runs of 10-fold crossvalidationand we choose 100 runs of 10-fold cross-validation for reasons <strong>to</strong> beexplained later.R> data("GlaucomaM", package = "ipred")R> glaucoma_rpart glaucoma_rpart$cptableCP nsplit rel error xerror xstd1 0.65306122 0 1.0000000 1.5306122 0.060543912 0.07142857 1 0.3469388 0.3877551 0.056476303 0.01360544 2 0.2755102 0.3775510 0.055904314 0.01000000 5 0.2346939 0.4489796 0.05960655© 2010 by Taylor and Francis Group, LLC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!