20.82 Conditional Regression Tree
We can also build a regression tree using (Hothorn et al. 2026).
##
## Model formula:
## risk_mm ~ rain_today + temp_3pm + temp_9am + cloud_3pm + cloud_9am +
## pressure_3pm + pressure_9am + humidity_3pm + humidity_9am +
## wind_speed_3pm + wind_speed_9am + wind_dir_3pm + wind_dir_9am +
## wind_gust_speed + wind_gust_dir + sunshine + evaporation +
## rainfall + max_temp + min_temp
##
## Fitted party:
## [1] root
## | [2] rainfall <= 8.9
## | | [3] humidity_3pm <= 83
## | | | [4] humidity_3pm <= 67
## | | | | [5] pressure_3pm <= 1010.1
## | | | | | [6] humidity_3pm <= 47
## | | | | | | [7] sunshine <= 7.7
## | | | | | | | [8] cloud_3pm <= 6
## | | | | | | | | [9] wind_gust_speed <= 91: 1.968 (n=878, err=NA)
## | | | | | | | | [10] wind_gust_speed > 91: 6.336 (n=26, err=NA)
## | | | | | | | [11] cloud_3pm > 6
## | | | | | | | | [12] wind_dir_3pm <= ENE: 5.371 (n=244, err=NA)
## | | | | | | | | [13] wind_dir_3pm > ENE
## | | | | | | | | | [14] humidity_3pm <= 30: 1.187 (n=214, err=NA)
## | | | | | | | | | [15] humidity_3pm > 30
## | | | | | | | | | | [16] wind_dir_3pm <= WNW: 2.129 (n=255, err=NA)
## | | | | | | | | | | [17] wind_dir_3pm > WNW: 4.431 (n=130, err=6221.8)
## | | | | | | [18] sunshine > 7.7
## | | | | | | | [19] wind_gust_speed <= 57
## | | | | | | | | [20] humidity_3pm <= 30
## | | | | | | | | | [21] humidity_3pm <= 16
## | | | | | | | | | | [22] wind_gust_speed <= 52
## | | | | | | | | | | | [23] humidity_3pm <= 12
## | | | | | | | | | | | | [24] wind_gust_speed <= 44: 0.012 (n=984, err=NA)
## | | | | | | | | | | | | [25] wind_gust_speed > 44: 0.080 (n=481, err=NA)
## | | | | | | | | | | | [26] humidity_3pm > 12: 0.116 (n=1057, err=NA)
## | | | | | | | | | | [27] wind_gust_speed > 52
## | | | | | | | | | | | [28] humidity_3pm <= 15: 0.215 (n=433, err=NA)
## | | | | | | | | | | | [29] humidity_3pm > 15: 0.795 (n=42, err=174.2)
## | | | | | | | | | [30] humidity_3pm > 16
## | | | | | | | | | | [31] wind_gust_speed <= 48
## | | | | | | | | | | | [32] pressure_3pm <= 1004.4: 0.806 (n=422, err=NA)
## | | | | | | | | | | | [33] pressure_3pm > 1004.4
## | | | | | | | | | | | | [34] humidity_9am <= 53
## | | | | | | | | | | | | | [35] cloud_3pm <= 7
## | | | | | | | | | | | | | | [36] sunshine <= 9.6: 0.211 (n=968, err=NA)
....
References
Hothorn, Torsten, Kurt Hornik, Carolin Strobl, and Achim Zeileis. 2026. Party: A Laboratory for Recursive Partytioning. http://party.R-forge.R-project.org.
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