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.593169e-01      0 1.0000000 1.0000000 0.004330348
## 2  2.841206e-02      1 0.8406831 0.8459873 0.004064450
## 3  5.090148e-03      3 0.7838590 0.7860235 0.003947922
## 4  3.996004e-03      7 0.7634984 0.7653775 0.003905924
## 5  3.900861e-03      9 0.7555064 0.7581942 0.003891076
## 22 4.043575e-04     55 0.7074830 0.7230389 0.003816596
## 23 3.805718e-04     56 0.7070786 0.7221588 0.003814692
## 24 3.746254e-04     58 0.7063175 0.7219685 0.003814280
## 25 3.726432e-04     63 0.7039389 0.7218258 0.003813971
## 26 3.647147e-04     66 0.7028210 0.7215166 0.003813301
## 27 3.567861e-04     72 0.7005613 0.7212311 0.003812682
## 28 3.330003e-04     76 0.6991342 0.7211598 0.003812528
## 29 3.171432e-04     80 0.6978022 0.7207554 0.003811651
## 80 5.550006e-05   1452 0.5474050 0.7315304 0.003834867
## 81 5.436740e-05   1548 0.5411255 0.7319109 0.003835682
## 82 5.351791e-05   1559 0.5403406 0.7319109 0.003835682
## 83 5.232862e-05   1567 0.5399125 0.7319109 0.003835682

%$

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-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0