R PMML Support: BetteR than EveR

October 2, 2013
By

(This article was first published on Predictive Analytics, Big Data, Hadoop, PMML, and kindly contributed to R-bloggers)

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.

pmml package

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 on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)