Learn R Programming

pmml (version 1.3)

pmml.rfsrc: Generate PMML for a Random Survival Forest (rsf) object

Description

Generate the Predictive Model Markup Language (PMML) representation of a randomSurvivalForest forest object. In particular, this function gives the user the ability to save the geometry of a forest as a PMML XML document.

Usage

## S3 method for class 'rfsrc':
pmml(model,
                   model.name="rsf_Model",
                   app.name="Rattle/PMML",
                   description="Random Survival Forest Model",
                   copyright=NULL,
                   transforms=NULL,
                   ...)

Arguments

model
the forest object contained in an object of class randomSurvivalForest, as that contained in the object returned by the function rsf with the parameter forest=TRUE.
model.name
a name to give to the model in the PMML.
app.name
the name of the application that generated the PMML.
description
a descriptive text for the header of the PMML.
copyright
the copyright notice for the model.
transforms
transforms to represent within the PMML.
...
further arguments passed to or from other methods.

Value

  • An object of class XMLNode as that defined by the XML package. This represents the top level, or root node, of the XML document and is of type PMML. It can be written to file with saveXML.

Details

The Predictive Model Markup Language is an XML based language which provides a way for applications to define statistical and data mining models and to share models between PMML compliant applications. More information about PMML and the Data Mining Group can be found at http://www.dmg.org.

Use of PMML and pmml.rfsrc requires the XML package. Be aware that XML is a very verbose data format. Reasonably sized trees and data sets can lead to extremely large text files.

This function is used to export the geometry of the forest to other PMML compliant applications, including graphics packages that are capable of printing binary trees. In addition, the user may wish to save the geometry of the forest for later retrieval and prediction on new data sets using pmml.rfsrc together with pmml_to_rsf.

References

H. Ishwaran, U.B. Kogalur, E.H. Blackstone, M.S. Lauer (2008), /emph{RANDOM SURVIVAL FORESTS}. The Annals of Applied Statistics, Vol. 2, No. 3, 841-860

H. Ishwaran and Udaya B. Kogalur (2006). Random Survival Forests. Cleveland Clinic Technical Report.

PMML home page: http://www.dmg.org A. Guazzelli, W. Lin, T. Jena (2012), PMML in Action: Unleashing the Power of Open Standards for Data Mining and Predictive Analytics. CreativeSpace (Second Edition) - Available on Amazon.com - http://www.amazon.com/dp/1470003244.

A. Guazzelli, M. Zeller, W. Lin, G. Williams (2009), PMML: An Open Standard for Sharing Models. The R journal, Volume 1/1, 60-65

See Also

pmml.

Examples

Run this code
# Until the rsf package is updated, do not run this.
# library(randomSurvivalForest)
# data(veteran, package = "randomSurvivalForest")
# veteran.out <- rsf(Survrsf(time, status)~.,
#         data = veteran,
#         ntree = 5,
#         forest = TRUE)
# veteran.forest <- veteran.out$forest
# pmml(veteran.forest)

Run the code above in your browser using DataLab