# R PMML Support: BetteR than EveR

[This article was first published on

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

How does it work? Simple! Once you build your model in R using any of the PMML supported model types, pass the model object as an input parameter to the pmml package as shown in the figure below.**Predictive Analytics, Big Data, Hadoop, PMML**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

The pmml package offers export for a variety of model types, including:

• ksvm (kernlab): Support Vector Machines

• nnet: Neural Networks

• rpart: C&RT Decision Trees

• lm & glm (stats): Linear and Binary Logistic Regression Models

• arules: Association Rules

• kmeans and hclust: Clustering Models

• multinom (nnet): Multinomial Logistic Regression Models

• glm (stats): Generalized Linear Models for classification and regression with

a wide variety of link functions

• randomForest: Random Forest Models for classification and regression

• coxph (survival): Cox Regression Models to calculate survival and stratified

cumulative hazards

• naiveBayes (e1071): Naive Bayes Classifiers

• glmnet: Linear ElasticNet Regression Models

• ada: Stochastic Boosting (coming soon)

• svm (e1071): Support Vector Machines (coming soon)

The pmml package can also export data transformations built with the pmmlTransformations package (see below). It can also be used to merge two distinct PMML files into one. For example, if transformations and model were saved into separate PMML files, it can combine both files, as described in Chapter 5 of the PMML book –

**PMML in Action**

Data Transformations – the R pmmlTransformations Package

The pmmlTransformations package transforms data and, when used in conjunction with the pmml package, allows for data transformations to be exported together with the predictive model in a single PMML file. Transformations currently supported are:

• Min-max normalization

• Z-score normalization

• Dummy-fication of categorical variables

• Value Mapping

• Variable renaming

To learn more about this package, check out the paper we presented at the

**KDD 2013 PMML Workshop**.

To

**leave a comment**for the author, please follow the link and comment on their blog:**Predictive Analytics, Big Data, Hadoop, PMML**.R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.