Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: tree-structured regression and classification models #84

Open
rikhuijzer opened this issue Jun 15, 2022 · 1 comment
Open

Comments

@rikhuijzer
Copy link

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))

image

Maybe this would be a nice feature for GraphMakie as well

@filchristou
Copy link
Collaborator

Actually this would be interesting if we could dispatch on scatter and instead of circles, draw general objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants