Skip to main content
100%

tut6

✓ Published0🌍 Public
BBenHeubl
Last edited Feb 13, 2020
Created on Feb 13, 2020

This example visualizes the output of a conditional inference tree model that predicts the percentage of “Leave” votes in the Brexit referendum from the training dataset `Brexit_train`. The chart displays both the tree’s internal split nodes—annotated with the chosen split variable and sample size—and terminal nodes, which include a bar plot showing the distribution of the target variable (`Percent.Leave`) as filled proportions. The visualization is built using the `ggparty` and `partykit` R packages, with `ctree()` generating the model and layered `ggplot2`-style geoms (`geom_edge`, `geom_node_label`, `geom_node_plot`) rendering the tree structure and node-level plots.

AI-generated description

Similar vizzes