20.18 Summary of the Model

summary(model)
## Call:
## rpart(formula=form, data=ds[tr, vars], model=TRUE)
##   n= 151934 
## 
##           CP nsplit rel error    xerror        xstd
## 1 0.15757483      0 1.0000000 1.0000000 0.004895087
## 2 0.03390348      1 0.8424252 0.8463348 0.004597363
## 3 0.01000000      3 0.7746182 0.7784973 0.004448507
## 
## Variable importance
##    humidity_3pm        temp_3pm        sunshine wind_gust_speed        max_temp 
##              78               5               4               3               3 
##        rainfall       cloud_3pm    humidity_9am  wind_speed_3pm  wind_speed_9am 
##               2               2               1               1               1 
## 
## Node number 1: 151934 observations,    complexity param=0.1575748
##   predicted class=No   expected loss=0.2154883  P(node) =1
##     class counts: 119194 32740
##    probabilities: 0.785 0.215 
##   left son=2 (126847 obs) right son=3 (25087 obs)
##   Primary splits:
##       humidity_3pm < 71.5    to the left,  improve=9016.219, (0 missing)
##       rainfall     < 0.55    to the left,  improve=5222.295, (0 missing)
##       rain_today   splits as  LR,          improve=5195.909, (0 missing)
##       cloud_3pm    < 6.5     to the left,  improve=3626.293, (0 missing)
##       sunshine     < 6.15    to the right, improve=2943.870, (0 missing)
##   Surrogate splits:
##       sunshine  < 0.55    to the right, agree=0.843, adj=0.051, (0 split)
##       temp_3pm  < 10.55   to the right, agree=0.843, adj=0.051, (0 split)
##       max_temp  < 10.65   to the right, agree=0.840, adj=0.029, (0 split)
##       rainfall  < 25.1    to the left,  agree=0.838, adj=0.020, (0 split)
##       cloud_3pm < 7.5     to the left,  agree=0.837, adj=0.011, (0 split)
## 
## Node number 2: 126847 observations
##   predicted class=No   expected loss=0.1388839  P(node) =0.8348823
##     class counts: 109230 17617
##    probabilities: 0.861 0.139 
## 
## Node number 3: 25087 observations,    complexity param=0.03390348
##   predicted class=Yes  expected loss=0.3971778  P(node) =0.1651177
....

In the following pages we dissect the various components of this summary.



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