15.7 Tree visualisation

  • Let’s visualise tree using the first model

  • Use rpart.plot

library(rpart.plot)
rpart.plot(cv_tree1$finalModel, main = "Decision Tree using Gini Index",
    tweak = 1.4)
Decision Tree using rpart.plot

Figure 15.4: Decision Tree using rpart.plot