Wednesday, October 2, 2013

R PMML Support: BetteR than EveR

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.

No comments:

Post a Comment

Welcome to the World of Predictive Analytics!

© Predictive Analytics by Zementis, Inc. - All Rights Reserved.

Copyright © 2009 Zementis Incorporated. All rights reserved.

Privacy - Terms Of Use - Contact Us