21.27 Rules from Decision Tree

We can use rattle::asRules() to convert the decision tree to a set of rules:

asRules(model)
## 
##  Rule number: 7 [rain_tomorrow=Yes cover=8027 (6%) prob=0.79]
##    humidity_3pm>=71.5
##    humidity_3pm>=83.5
## 
##  Rule number: 13 [rain_tomorrow=Yes cover=4590 (4%) prob=0.62]
##    humidity_3pm>=71.5
##    humidity_3pm< 83.5
##    wind_gust_speed>=42
## 
##  Rule number: 12 [rain_tomorrow=No cover=6840 (6%) prob=0.37]
##    humidity_3pm>=71.5
##    humidity_3pm< 83.5
##    wind_gust_speed< 42
## 
##  Rule number: 2 [rain_tomorrow=No cover=104265 (84%) prob=0.14]
##    humidity_3pm< 71.5


Your donation will support ongoing development 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.