powered by
Generate the PMML representation for a rpart object from package rpart.
# S3 method for rpart pmml(model, model.name="RPart_Model", app.name="Rattle/PMML", description="RPart Decision Tree Model", copyright=NULL, transforms=NULL, unknownValue=NULL, dataset=NULL, …)
a rpart object.
rpart
a name to be given to the model in the PMML code.
the name of the application that generated the PMML code.
a descriptive text for the Header element of the PMML code.
the copyright notice for the model.
data transformations represented in PMML via pmmlTransformations.
value to be used as the 'missingValueReplacement' attribute for all MiningFields.
the original dataset used to train the model.
further arguments passed to or from other methods.
The pmml function supports regression tree as well as classification tree of a rpart object. The object is represented in the PMML TreeModel format.
pmml
R project CRAN package: rpart: Recursive Partitioning https://CRAN.R-project.org/package=rpart
# NOT RUN { library(rpart) fit <- rpart(Species ~ ., data=iris) pmml(fit) rm(fit) # }
Run the code above in your browser using DataLab