pmml (version 1.5.1)

pmml.randomForest: Generate PMML for randomForest objects

Description

Generate the PMML representation for a randomForest object from package randomForest.

Usage

"pmml"(model, model.name="randomForest_Model", app.name="Rattle/PMML", description="Random Forest Tree Model", copyright=NULL, transforms=NULL, unknownValue=NULL, ...)

Arguments

model
a randomForest object.
model.name
a name to be given to the model in the PMML code.
app.name
the name of the application that generated the PMML code.
description
a descriptive text for the Header element of the PMML code.
copyright
the copyright notice for the model.
transforms
data transformations represented in PMML via pmmlTransformations.
unknownValue
value to be used as the 'missingValueReplacement' attribute for all MiningFields.
...
further arguments passed to or from other methods.

Details

This function outputs a Random Forest in PMML format. The model will include not just the forest but also any pre-processing applied to the training data.

References

R project CRAN package: randomForest: Breiman and Cutler's random forests for classification and regression https://CRAN.R-project.org/package=randomForest

Examples

Run this code

# Build a simple randomForest model

library(randomForest)
iris.rf <- randomForest(Species ~ ., data=iris, ntree=20)

# Convert to pmml

pmml(iris.rf)

rm(iris.rf)

Run the code above in your browser using DataLab