#| child: aaa.Rmd
#| include: false

r descr_models("decision_tree", "spark")

Tuning Parameters

#| label: spark-param-info
#| echo: false
defaults <- 
  tibble::tibble(parsnip = c("tree_depth", "min_n"),
                 default = c("5L", "1L"))

param <-
 decision_tree() |> 
  set_engine("spark") |> 
  set_mode("regression") |> 
  make_parameter_list(defaults)

This model has r nrow(param) tuning parameters:

#| label: spark-param-list
#| echo: false
#| results: asis
param$item

Translation from parsnip to the original package (classification)

#| label: spark-cls
decision_tree(tree_depth = integer(1), min_n = integer(1)) |> 
  set_engine("spark") |> 
  set_mode("classification") |> 
  translate()

Translation from parsnip to the original package (regression)

#| label: spark-reg
decision_tree(tree_depth = integer(1), min_n = integer(1)) |> 
  set_engine("spark") |> 
  set_mode("regression") |> 
  translate()

Preprocessing requirements

#| child: template-tree-split-factors.Rmd

Case weights

#| child: template-uses-case-weights.Rmd

Note that, for spark engines, the case_weight argument value should be a character string to specify the column with the numeric case weights.

Other details

#| child: template-spark-notes.Rmd

References



Try the parsnip package in your browser

Any scripts or data that you put into this service are public.

parsnip documentation built on June 8, 2025, 12:10 p.m.