Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Can rxDForest models be exported in PMML


View products that this article applies to.

Summary

PMML is not supported.  Here is a workaround.

RevoScaleR's rxDTree objects can be coerced to rpart objects. (Note that rpart is a recommended package that you may need to load.)

 

 library(rpart)

method <- "class"

form <- Kyphosis ~ Number + Start

parms <- list(prior = c(0.8, 0.2), loss = c(0, 2, 3, 0),

split = "gini")

control <- rpart.control(minsplit = 5, minbucket = 2, cp = 0.01,

maxdepth = 10, maxcompete = 4, maxsurrogate = 5, 20 usesurrogate = 2, surrogatestyle = 0, xval = 0)

cost <- 1 + seq(length(attr(terms(form), "term.labels")))

rxDTreeObj <- rxDTree(formula = Kyphosis ~ Number + Start,

 data = kyphosis, method = method, parms = parms,

 control = control, cost = cost)

pmml(as.rpart(rxDTreeObj)) 

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 3104232
Revision : 1
Created on : 1/7/2017
Published on : 10/29/2015
Exists online : False
Views : 54