Learn R Programming

rattle (version 5.5.1)

randomForest2Rules: Generate accessible data structure of a randomForest model

Description

A randomForest model, by default, consists of 500 decision trees. This function walks through each tree and generates a set of rules. This takes a considerable amount of time and is provided for users to access the actual model, but it is not yet used within the Rattle GUI. It may be used to display the output of the RF (but it takes longer to generate than the model itself!). Or it might only be used on export to PMML or SQL.

Usage

randomForest2Rules(model, models=NULL)

Arguments

model

a randomForest model.

models

a list of integers limiting the models in MODEL that are converted.

References

Package home page: https://rattle.togaware.com

Examples

Run this code
# NOT RUN {
## Generate a ruleset for a specific model amongst the 500.
# }
# NOT RUN {
randomForest2Rules(rfmodel, 5)
# }
# NOT RUN {
## Generate a ruleset for specific models amongst the 500.
# }
# NOT RUN {
randomForest2Rules(rfmodel, c(5,10,15))
# }
# NOT RUN {
## Generate a ruleset for each of the 500 models.
# }
# NOT RUN {
randomForest2Rules(rfmodel)
# }

Run the code above in your browser using DataLab