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

Expand checking done in check_args() #1095

Open
EmilHvitfeldt opened this issue Apr 2, 2024 · 0 comments
Open

Expand checking done in check_args() #1095

EmilHvitfeldt opened this issue Apr 2, 2024 · 0 comments
Labels
feature a feature request or enhancement

Comments

@EmilHvitfeldt
Copy link
Member

EmilHvitfeldt commented Apr 2, 2024

Something like decision_tree() doesn't do any type checking, where we can at least check for numeric input and sensible ranges without getting opinionated

library(parsnip)

data(hpc_data, package = "modeldata")

bt <- decision_tree(tree_depth = c(1, 5, 10)) %>% 
  set_engine("rpart") %>%
  set_mode("classification")

fit(bt, class ~ ., hpc_data)
#> Error in if (maxdepth > 30L) stop("Maximum depth is 30"): the condition has length > 1

Created on 2024-04-01 with reprex v2.1.0

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

No branches or pull requests

1 participant