Go to TogaWare.com Home Page. Data Science Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

Complexity Parameter Table

We can look at the raw data to have a more precise and detailed view of the data. Here we only list specific rows from the complexity parameter table.

tmodel$cptable[c(1:5,22:29, 80:83),]
##              CP nsplit rel error    xerror        xstd
## 1  1.453731e-01      0 1.0000000 1.0000000 0.004616611
## 2  3.460366e-02      1 0.8546269 0.8546269 0.004349444
## 3  6.877579e-03      3 0.7854195 0.7894112 0.004214897
## 4  4.814305e-03      4 0.7785420 0.7856353 0.004206800
## 5  3.506217e-03      8 0.7592847 0.7633573 0.004158311
## 22 5.394180e-04     40 0.7199342 0.7314238 0.004086605
## 23 5.259325e-04     41 0.7193948 0.7308574 0.004085309
## 24 5.214374e-04     52 0.7130566 0.7302910 0.004084012
## 25 5.124471e-04     55 0.7114923 0.7302640 0.004083951
## 26 4.854762e-04     57 0.7104674 0.7300752 0.004083518
## 27 4.719907e-04     60 0.7090110 0.7294279 0.004082035
## 28 4.585053e-04     64 0.7071230 0.7294279 0.004082035
## 29 4.315344e-04     66 0.7062060 0.7285649 0.004080055
## 80 8.630687e-05    791 0.5906627 0.7232246 0.004067761
## 81 8.540784e-05    807 0.5888017 0.7235213 0.004068446
## 82 8.091270e-05    815 0.5880735 0.7241686 0.004069940
## 83 7.754133e-05   1012 0.5709469 0.7263533 0.004074973

See how the relative error continues to decrease as the tree becomes more complex, but the cross validated error decreases and then starts to increase! We might choose a sensible value of cp= from this table.


Support further development by purchasing the PDF version of the book.
Other online resources include the GNU/Linux Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 2000-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.