pmml.rpart {pmml} | R Documentation |
Generate the PMML representation for a rpart object from package rpart.
## S3 method for class 'rpart' pmml(model, model.name="RPart_Model", app.name="Rattle/PMML", description="RPart Decision Tree Model", copyright=NULL, transforms=NULL, unknownValue=NULL, dataset=NULL, ...)
model |
a |
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. |
dataset |
the original dataset used to train the model. |
... |
further arguments passed to or from other methods. |
The pmml
function supports regression tree as well as
classification tree of a rpart
object. The object is represented
in the PMML TreeModel format.
Graham.Williams@togaware.com, Zementis Inc. info@zementis.com
R project CRAN package: rpart: Recursive Partitioning
http://cran.r-project.org/web/packages/rpart/index.html
library(rpart) fit <- rpart(Species ~ ., data=iris) pmml(fit) rm(fit)