Learn R Programming

tidyrules (version 0.2.7)

tidy.cubist: Get the rulelist from a cubist model

Description

Each row corresponds to a rule per committee

Usage

# S3 method for cubist
tidy(x, ...)

Value

A rulelist object

Arguments

x

Cubist::cubist model

...

Other arguments (currently unused)

Details

  • The output columns are: rule_nbr, committee, LHS, RHS, support, mean, min, max, error.

  • Rules are sorted in this order per committee: error, desc(support)

See Also

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

Other Core Tidy Utility: tidy(), tidy.C5.0(), tidy.rpart()

Examples

Run this code
att = modeldata::attrition
cols_att    = setdiff(colnames(att), c("MonthlyIncome", "Attrition"))
model_cubist = Cubist::cubist(x = att[, cols_att],
                              y = att[["MonthlyIncome"]]
                              )
tidy(model_cubist)

Run the code above in your browser using DataLab