Learn R Programming

tidyrules (version 0.2.7)

tidy.C5.0: Get the rulelist from a C5 model

Description

Each row corresponds to a rule per trial_nbr

Usage

# S3 method for C5.0
tidy(x, ...)

Value

A rulelist object

Arguments

x

C50::C5.0 model fitted with rules = TRUE

...

Other arguments (See details)

Details

  • The output columns are: rule_nbr, trial_nbr, LHS, RHS, support, confidence, lift.

  • Rules per trial_nbr are sorted in this order: desc(confidence), desc(lift), desc(support).

Optional named arguments:

  • laplace (flag, default: TRUE) is supported. This computes confidence with laplace correction as documented under 'Rulesets' here: C5 doc.

See Also

rulelist, tidy, augment, predict, calculate, prune, reorder

Other Core Tidy Utility: tidy(), tidy.cubist(), tidy.rpart()

Examples

Run this code
model_c5 = C50::C5.0(Attrition ~., data = modeldata::attrition, rules = TRUE)
tidy(model_c5)

Run the code above in your browser using DataLab