Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pmml.rpart

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


Description

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

Usage

## S3 method for class 'rpart'
pmml(
  model,
  model_name = "RPart_Model",
  app_name = "SoftwareAG PMML Generator",
  description = "RPart Decision Tree Model",
  copyright = NULL,
  transforms = NULL,
  missing_value_replacement = NULL,
  dataset = NULL,
  ...
)

Arguments

model

An rpart object.

model_name

A name to be given to the PMML model.

app_name

The name of the application that generated the PMML.

description

A descriptive text for the Header element of the PMML.

copyright

The copyright notice for the model.

transforms

Data transformations.

missing_value_replacement

Value to be used as the 'missingValueReplacement' attribute for all MiningFields.

dataset

Data used to train the rpart model.

...

Further arguments passed to or from other methods.

Details

Supports regression tree as well as classification. The object is represented in the PMML TreeModel format.

Value

PMML representation of the rpart object.

Author(s)

Graham Williams

References

Examples

library(rpart)

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

fit_pmml <- pmml(fit)

pmml

Generate PMML for Various Models

v2.4.0
GPL-3 | file LICENSE
Authors
Dmitriy Bolotov [aut, cre], Tridivesh Jena [aut], Graham Williams [aut], Wen-Ching Lin [aut], Michael Hahsler [aut], Hemant Ishwaran [aut], Udaya B. Kogalur [aut], Rajarshi Guha [aut], Software AG [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.