tidyRules.rpart {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 'rpart'
tidyRules(object, ...)
object |
Fitted model object with rules |
... |
Other arguments (currently unused) |
NOTE: For rpart rules, one should build the model without ordered factor variable. We recommend you to convert ordered factor to factor or integer class.
Optional named arguments:
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
Amith Kumar U R, amith54@gmail.com
iris_rpart <- rpart::rpart(Species ~ .,data = iris)
tidyRules(iris_rpart)