pmml.ada {pmml} | R Documentation |
Generate the PMML representation for an ada object from package ada.
## S3 method for class 'ada' pmml(model, model.name="AdaBoost_Model", app.name="R-PMML", description="AdaBoost Model", copyright=NULL, transforms=NULL, unknownValue=NULL, ...)
model |
|
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. |
The pmml
function exports the ada model in the PMML MiningModel (multiple models) format.
The MiningModel element consists of a list of TreeModel elements, one in each model segment.
Note that each segment tree is a classification model, returning either -1 or 1. However the MiningModel (ada algorithm) is doing a weighted sum of the returned value, -1 or 1. So the value of attribute functionName of element MiningModel is set to "regression"; the value of attribute functionName of each segment tree is also set to "regression" (they have to be the same as the parent MiningModel per PMML schema). Although each segment/tree is being named a "regression" tree, the actual returned score can only be -1 or 1, which practically turns each segment into a classification tree.
The model in PMML format has 5 different outputs. The "rawValue" output is the value of the model expressed as a tree model. The boosted tree model uses a transformation of this value, this is the "boostValue" output. The last 3 outputs are the predicted class and the probabilities of each of the 2 classes (The ada package Boosted Tree models can only handle binary classification models).
Zementis Inc. info@zementis.com
R project CRAN package: ada: an R package for stochastic boosting
http://cran.r-project.org/web/packages/ada/index.html
library(ada) library(pmml) data(audit) fit <- ada(Adjusted~Employment+Education+Hours+Income,iter=3, audit) pmml_fit <- pmml(fit)