pmml.randomForest: Generate PMML for randomForest objects
Description
Generate the PMML representation for a randomForest object from package randomForest.
Usage
# S3 method for randomForest
pmml(model, model.name="randomForest_Model",
app.name="Rattle/PMML",
description="Random Forest Tree Model",
copyright=NULL, transforms=NULL, unknownValue=NULL,
parentInvalidValueTreatment="returnInvalid",
childInvalidValueTreatment="asIs", ...)
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.
parentInvalidValueTreatment
invalid value treatment at the top MiningField level.
childInvalidValueTreatment
invalid value treatment at the model segment MiningField level.
…
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.
# NOT RUN {# Build a simple randomForest model
library(randomForest)
iris.rf <- randomForest(Species ~ ., data=iris, ntree=20)
# Convert to pmml
pmml(iris.rf)
rm(iris.rf)
# }