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.

• C5.0¹²

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

More information on how parsnip is used for modeling is at https://www.tidymodels.org/.

## Usage

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

## Arguments

mode

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

trees

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

min_n

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.

engine

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

## Details

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.

## References

Quinlan R (1993). C4.5: Programs for Machine Learning. Morgan Kaufmann Publishers.

## See also

C50::C5.0(), C50::C5.0Control(), fit(), set_engine(), update(), C5.0 engine details

## Examples

show_engines("C5_rules")
#> # A tibble: 0 × 2
#> # … with 2 variables: engine <chr>, mode <chr>

C5_rules()
#> ! 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
#>