get_rules: Get RuleFit rules

View source: R/get_rules.R

get_rulesR Documentation

Get RuleFit rules

Description

Get rules generated by s_RuleFit or s_LightRuleFit

Usage

get_rules(
  mod,
  formatted = FALSE,
  collapse = TRUE,
  collapse.keep.names = FALSE,
  collapse.unique = TRUE
)

Arguments

mod

Model created by s_RuleFit or s_LightRuleFit

formatted

Logical: If TRUE, return human-readable rules, otherwise return R-parsable rules

collapse

Logical: If TRUE, collapse all rules to a single character vector

collapse.keep.names

Logical: If TRUE, keep names when collapsing (will be able to tell which run each rule came from). However, has no effect if collapse.unique = TRUE, as unique() removes names.

collapse.unique

Logical: If TRUE and collapse = TRUE, will return only unique rules

Author(s)

ED Gennatas


egenn/rtemis documentation built on Oct. 28, 2024, 6:30 a.m.