Open rikhuijzer opened 2 years ago
I'm trying to visualize a decision tree. The interpretable ML book has a nice visualization for it:
library("partykit") set.seed(42) n = 100 dat_sim = data.frame(feature_x1 = rep(c(3,3,4,4), times = n), feature_x2 = rep(c(1,2,2,2), times = n), y = rep(c(1, 2, 3, 4), times = n)) dat_sim = dat_sim[sample(1:nrow(dat_sim), size = 0.9 * nrow(dat_sim)), ] dat_sim$y = dat_sim$y + rnorm(nrow(dat_sim), sd = 0.2) ct = ctree(y ~ feature_x1 + feature_x2, dat_sim) plot(ct, inner_panel = node_inner(ct, pval = FALSE, id = FALSE), terminal_panel = node_boxplot(ct, id = FALSE))
Maybe this would be a nice feature for GraphMakie as well
Actually this would be interesting if we could dispatch on scatter and instead of circles, draw general objects.
scatter
I'm trying to visualize a decision tree. The interpretable ML book has a nice visualization for it:
Maybe this would be a nice feature for GraphMakie as well