pmml.rpart {pmml}R Documentation

Generate PMML for rpart objects

Description

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

Usage

## S3 method for class 'rpart'
pmml(model, model.name="RPart_Model", app.name="Rattle/PMML",
     description="RPart Decision Tree Model", copyright=NULL, transforms=NULL,
     dataset=NULL, ...)

Arguments

model

a rpart 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.

dataset

the original dataset used to train the model.

...

further arguments passed to or from other methods.

Details

The pmml function supports regression tree as well as classification tree of a rpart object. The object is represented in the PMML TreeModel format.

Author(s)

Graham.Williams@togaware.com, Zementis Inc. info@zementis.com

References

R project CRAN package: rpart: Recursive Partitioning
http://cran.r-project.org/web/packages/rpart/index.html

Examples

library(rpart)
fit <- rpart(Species ~ ., data=iris)
pmml(fit)

[Package pmml version 1.4.1 Index]