pmml.randomForest: Generate the PMML representation for a randomForest object...

View source: R/pmml.randomForest.R

pmml.randomForestR Documentation

Generate the PMML representation for a randomForest object from the package randomForest.

Description

Generate the PMML representation for a randomForest object from the package randomForest.

Usage

## S3 method for class 'randomForest'
pmml(
  model,
  model_name = "randomForest_Model",
  app_name = "SoftwareAG PMML Generator",
  description = "Random Forest Tree Model",
  copyright = NULL,
  model_version = NULL,
  transforms = NULL,
  missing_value_replacement = NULL,
  parent_invalid_value_treatment = "returnInvalid",
  child_invalid_value_treatment = "asIs",
  ...
)

Arguments

model

A randomForest 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.

model_version

A string specifying the model version.

transforms

Data transformations.

missing_value_replacement

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

parent_invalid_value_treatment

Invalid value treatment at the top MiningField level.

child_invalid_value_treatment

Invalid value treatment at the model segment MiningField level.

...

Further arguments passed to or from other methods.

Details

This function outputs a Random Forest in PMML format.

Value

PMML representation of the randomForest object.

Author(s)

Tridivesh Jena

References

randomForest: Breiman and Cutler's random forests for classification and regression

Examples

## Not run: 
# Build a randomForest model
library(randomForest)
iris_rf <- randomForest(Species ~ ., data = iris, ntree = 20)

# Convert to pmml
iris_rf_pmml <- pmml(iris_rf)

rm(iris_rf)

## End(Not run)

pmml documentation built on March 18, 2022, 5:49 p.m.