randomForest2Rules: Generate accessible data structure of a randomForest model

Description Usage Arguments Author(s) References Examples

View source: R/random_forest.R

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

1
randomForest2Rules(model, models=NULL)

Arguments

model

a randomForest model.

models

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

Author(s)

[email protected]

References

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

Examples

1
2
3
4
5
6
7
8
## Generate a ruleset for a specific model amongst the 500.
## Not run: randomForest2Rules(rfmodel, 5)

## Generate a ruleset for specific models amongst the 500.
## Not run: randomForest2Rules(rfmodel, c(5,10,15))

## Generate a ruleset for each of the 500 models.
## Not run: randomForest2Rules(rfmodel)

Example output

R session is headless; GTK+ not initialized.
Rattle: A free graphical interface for data mining with R.
Version 4.1.0 Copyright (c) 2006-2015 Togaware Pty Ltd.
Type 'rattle()' to shake, rattle, and roll your data.

rattle documentation built on Aug. 17, 2018, 5:04 p.m.