pmml (version 1.5.1)

pmml.ada: Generate PMML for ada objects

Description

Generate the PMML representation for an ada object from package ada.

Usage

"pmml"(model, model.name="AdaBoost_Model", app.name="R-PMML", description="AdaBoost Model", copyright=NULL, transforms=NULL, unknownValue=NULL, ...)

Arguments

model
ada 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.
...
further arguments passed to or from other methods.

Details

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. This function implements the discrete adaboost algorithm only. 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).

References

R project CRAN package: ada: an R package for stochastic boosting https://CRAN.R-project.org/package=ada

Examples

Run this code

library(ada)
library(pmml)
data(audit)

fit <- ada(Adjusted~Employment+Education+Hours+Income,iter=3, audit)
pmml_fit <- pmml(fit)

Run the code above in your browser using DataCamp Workspace