pmml.randomForest {pmml}R Documentation

Generate PMML for randomForest objects

Description

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

Usage

## S3 method for class 'randomForest'
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 package 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.

Author(s)

Zementis Inc. info@zementis.com

References

R project CRAN package:
randomForest: Breiman and Cutler's random forests for classification and regression
http://cran.r-project.org/web/packages/randomForest/index.html

Examples


# Build a simple randomForest model

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

# Convert to pmml

pmml(iris.rf)

rm(iris.rf)


[Package pmml version 1.4.2 Index]