Skip to content

C5_rules() defines a model that derives feature rules from a tree for prediction. A single tree or boosted ensemble can be used. This function can fit classification models.

There are different ways to fit this model, and the method of estimation is chosen by setting the model engine. The engine-specific pages for this model are listed below.

¹ The default engine. ² Requires a parsnip extension package.

More information on how parsnip is used for modeling is at


C5_rules(mode = "classification", trees = NULL, min_n = NULL, engine = "C5.0")



A single character string for the type of model. The only possible value for this model is "classification".


A non-negative integer (no greater than 100) for the number of members of the ensemble.


An integer greater between zero and nine for the minimum number of data points in a node that are required for the node to be split further.


A single character string specifying what computational engine to use for fitting.


C5.0 is a classification model that is an extension of the C4.5 model of Quinlan (1993). It has tree- and rule-based versions that also include boosting capabilities. C5_rules() enables the version of the model that uses a series of rules (see the examples below). To make a set of rules, an initial C5.0 tree is created and flattened into rules. The rules are pruned, simplified, and ordered. Rule sets are created within each iteration of boosting.

This function only defines what type of model is being fit. Once an engine is specified, the method to fit the model is also defined. See set_engine() for more on setting the engine, including how to set engine arguments.

The model is not trained or fit until the fit() function is used with the data.


Quinlan R (1993). C4.5: Programs for Machine Learning. Morgan Kaufmann Publishers., Tidy Modeling with R, searchable table of parsnip models


#> # A tibble: 0 × 2
#> # … with 2 variables: engine <chr>, mode <chr>

#> ! parsnip could not locate an implementation for `C5_rules` model
#>   specifications.
#>  The parsnip extension package rules implements support for this
#>   specification.
#>  Please install (if needed) and load to continue.
#> C5.0 Model Specification (classification)
#> Computational engine: C5.0