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

r descr_models("rule_fit", "h2o")

Tuning Parameters

#| label: h2o-param-info
#| echo: false
defaults <- 
  tibble::tibble(parsnip = c("tree_depth", "trees", "penalty"),
                 default = c("3L", "50L", 0))

param <-
  rule_fit() |> 
  set_engine("h2o") |> 
  make_parameter_list(defaults)

This model has r nrow(param) tuning parameters:

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

Note that penalty for the h2o engine in `rule_fit()`` corresponds to the L1 penalty (LASSO).

Other engine arguments of interest:

Translation from parsnip to the underlying model call (regression)

[agua::h2o_train_rule()] is a wrapper around [h2o::h2o.rulefit()].

r uses_extension("rule_fit", "h2o", "regression")

#| label: h2o-reg
library(rules)

rule_fit(
  trees = integer(1),
  tree_depth = integer(1),
  penalty = numeric(1)
) |>
  set_engine("h2o") |>
  set_mode("regression") |>
  translate()

Translation from parsnip to the underlying model call (classification)

[agua::h2o_train_rule()] for rule_fit() is a wrapper around [h2o::h2o.rulefit()].

r uses_extension("rule_fit", "h2o", "classification")

#| label: h2o-cls
rule_fit(
  trees = integer(1),
  tree_depth = integer(1),
  penalty = numeric(1)
) |>
  set_engine("h2o") |>
  set_mode("classification") |>
  translate()

Preprocessing requirements

#| child: template-makes-dummies.Rmd

Other details

#| child: template-h2o-init.Rmd

Saving fitted model objects

#| child: template-bundle.Rmd


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.