Returns a ruleset object

as_ruleset(rulelist)

Arguments

rulelist

A rulelist

Value

A ruleset

See also

Examples

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…     123      1      2.77 6               
#> 2        2 ( island %in% c('Bis… Adel…      38      1      2.26 4               
#> 3        3 ( island %in% c('Dre… Adel…     100      0.99   2.24 9               
#> 4        4 ( island %in% c('Dre… Chin…      64      0.969  4.90 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              
#> --------------------------------------------