Skip to content

Commit

Permalink
add model args for decision_tree(engine = "linfa")
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Jul 29, 2024
1 parent fdcf11b commit 4db6ab2
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions R/mod-decision_tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,33 @@ make_decision_tree_linfa <- function() {
)
)

set_model_arg(
model = "decision_tree",
eng = "linfa",
parsnip = "cost_complexity",
original = "cost_complexity",
func = list(pkg = "dials", fun = "cost_complexity"),
has_submodel = FALSE
)

parsnip::set_model_arg(
model = "decision_tree",
eng = "linfa",
parsnip = "min_n",
original = "min_n",
func = list(pkg = "dials", fun = "min_n"),
has_submodel = FALSE
)

parsnip::set_model_arg(
model = "decision_tree",
eng = "linfa",
parsnip = "tree_depth",
original = "tree_depth",
func = list(pkg = "dials", fun = "tree_depth"),
has_submodel = FALSE
)

parsnip::set_encoding(
model = "decision_tree",
mode = "classification",
Expand Down

0 comments on commit 4db6ab2

Please sign in to comment.