tidymodels / tidypredict

Run predictions inside the database
https://tidypredict.tidymodels.org
Other
257 stars 31 forks source link

[feature request] Partykit ctree multiway support #68

Open brickfrog opened 4 years ago

brickfrog commented 4 years ago

Curious if it would be much work to add multiway support to ctree, which allows for non-binary splits similar to the CHAID algorithm.

Such as:

tree <- ctree(Y ~ ., data = data, control = ctree_control(maxdepth = 3,
                                                               multiway = TRUE))

tidypredict_sql(tree, dbplyr::simulate_oracle())
Error in .f(.x[[i]], ...) : Three levels are not supported

Noticed in the source code it calls that error with 3 levels. Wasn't sure if that was due to the use-case not coming up or if there's a technical limitation.