20.23 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.660975e-01      0 1.0000000 1.0000000 0.004107529
## 2  2.785832e-02      1 0.8339025 0.8391005 0.003844367
## 3  3.758833e-03      3 0.7781859 0.7780140 0.003731247
## 4  3.350731e-03      5 0.7706682 0.7580385 0.003692494
## 5  3.318513e-03     10 0.7473634 0.7528621 0.003682304
## 22 3.758833e-04     66 0.6996585 0.7177438 0.003611509
## 23 3.651438e-04     68 0.6989067 0.7176150 0.003611244
## 24 3.436648e-04     70 0.6981764 0.7164336 0.003608810
## 25 3.221857e-04     71 0.6978328 0.7151019 0.003606063
## 26 3.150260e-04     73 0.6971884 0.7150590 0.003605975
## 27 3.078663e-04     76 0.6962433 0.7151234 0.003606108
## 28 3.007067e-04     82 0.6943961 0.7149730 0.003605797
## 29 2.899671e-04     86 0.6931933 0.7146509 0.003605132
## 80 5.101274e-05   1509 0.5501214 0.7318985 0.003640397
## 81 5.011778e-05   1524 0.5491118 0.7322422 0.003641092
## 82 4.832786e-05   1634 0.5420882 0.7323066 0.003641223
## 83 4.773122e-05   1678 0.5395322 0.7323066 0.003641223

%$

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 from this table.



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0