Prints the ruleset object
# S3 method for ruleset
print(x, banner = TRUE, ...)
A rulelist
(flag, default: TRUE
) Should the banner be displayed
Passed to print.rulelist
(invisibly) Returns the ruleset object
model_class_party = partykit::ctree(species ~ .,
data = palmerpenguins::penguins
)
as_ruleset(tidy(model_class_party))
#> ---- Ruleset -------------------------------
#> ▶ Keys: NULL
#> ▶ Number of rules: 6
#> ▶ Model type: constparty
#> ▶ Estimation type: classification
#> ▶ Is validation data set: FALSE
#>
#>
#> rule_nbr LHS RHS support confidence lift terminal_node_id
#> <int> <chr> <fct> <dbl> <dbl> <dbl> <chr>
#> 1 1 ( island %in% c('Bis… Gent… 122 1 2.77 6
#> 2 2 ( island %in% c('Dre… Adel… 99 0.990 2.24 9
#> 3 3 ( island %in% c('Bis… Adel… 39 0.974 2.21 4
#> 4 4 ( island %in% c('Dre… Chin… 65 0.954 4.83 11
#> 5 5 ( island %in% c('Bis… Adel… 7 0.857 1.94 5
#> 6 6 ( island %in% c('Dre… Adel… 12 0.583 1.32 10
#> --------------------------------------------