tidyRules.C5.0 {tidyrules}R Documentation

Obtain rules as a tidy tibble from a C5.0 model

Description

Each row corresponds to a rule. A rule can be copied into 'dplyr::filter' to filter the observations corresponding to a rule

Usage

## S3 method for class 'C5.0'
tidyRules(object, ...)

Arguments

object

Fitted model object with rules

...

Other arguments (See details)

Details

Optional named arguments:

Value

A tibble where each row corresponds to a rule. The columns are: support, confidence, lift, lhs, rhs, n_conditions

Author(s)

Srikanth KS, sri.teach@gmail.com

Examples

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)

[Package tidyrules version 0.1.5 Index]