# NOT RUN {
# Make a gbm model:
library(gbm)
data(audit)
mod <- gbm(Adjusted ~ .,
data = audit[, -c(1, 4, 6, 9, 10, 11, 12)],
n.trees = 3,
interaction.depth = 4
)
# Export to PMML:
pmod <- pmml(mod)
# Save to an external file:
save_pmml(pmod, "GBMModel.pmml")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab