tidyRules.C5.0 {tidyrules} | R Documentation |
Each row corresponds to a rule. A rule can be copied into 'dplyr::filter' to filter the observations corresponding to a rule
## S3 method for class 'C5.0'
tidyRules(object, ...)
object |
Fitted model object with rules |
... |
Other arguments (See details) |
Optional named arguments:
laplace(flag, default: TRUE) is supported. This computes confidence with laplace correction as documented under 'Rulesets' here: [C5 doc](https://www.rulequest.com/see5-unix.html).
language (string, default: "r"): language where the rules are parsable. The allowed options is one among: r, python, sql
A tibble where each row corresponds to a rule. The columns are: support, confidence, lift, lhs, rhs, n_conditions
Srikanth KS, sri.teach@gmail.com
data("attrition", package = "modeldata")
attrition <- tibble::as_tibble(attrition)
c5_model <- C50::C5.0(Attrition ~., data = attrition, rules = TRUE)
summary(c5_model)
tidyRules(c5_model)