Is it possible to design a decision tree through the visTree function

34 Views Asked by At

I am using the rpart Decision Tree algorithm and would like to visualize it with an interactive visualization using the visNetwork library.To visualize the Decision Tree model, I use the visTree function from the visNetwork library. Specifically, I am interested in whether it is possible to change the background color and enlarge the graph display.Here is a code snippet from the visNetwork documentation:

library(rpart)
library(visNetwork)


data("solder")
res <- rpart(Opening~., data = solder, control = rpart.control(cp = 0.00005))
visTree(res, height = "800px", nodesPopSize = TRUE, minNodeSize = 10, 
        maxNodeSize = 30, width = "100%")

If it can't be done through function, can it be done through HTML and CSS?

0

There are 0 best solutions below