Follow

New R PMMLTransformations package version 1.3 released

R PMML Transformations Package

 
This is a brand new R package. Called pmmlTranformations, this package transforms data and when used in conjunction with the pmml package, it 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
  • Discretization (binning)
  • Variable renaming
If you would like to contribute code to the pmmlTransformations package, please feel free to contact us.

New Features

The released package version 1.3 has new functions to translate arbitrary mathematical expressions into a PMML representation. These new functions are:

  • FunctionXform
  • FunctionToPMML

To use these functions, one simply supplies an arbitrary mathematical expression, written in a normal way, as the input and the equivalent PMML expression is given as the output.

The 'FunctionToPMML' function is meant to be used to get a quick look at the PMML expressions output while the 'FunctionXform' function is meant to be used just as the other pmmlTransformations functions, as described below, to add those expressions to the 'LocalTransformations' element automatically.

For more information, simply load the pmmlTransformations library in R and type 'vignettes("FunctionXform")

 

How does it work?

The pmmlTransformations package works in tandem with the pmml package so that data pre-processing can be represented together with the model in the resulting PMML code. 
In R, as shown in the figure below, this process includes three steps:
  1. With the use of the pmmlTransformations package, transform the raw input data as appropriate
  2. Use transformed and raw data as inputs to the modeling function/package (hclust, nnet, glm, ...)
  3. Output the entire solution (data pre-processing + model) in PMML using the pmml package

Screen_Shot_2013-08-20_at_2.59.55_PM.png

Example - sequence of R commands used to build a linear regression model using lm with transformed data

Screen_Shot_2013-08-19_at_10.48.42_AM.png

Documentation

For more on the pmmlTransformations package, please take a look at the paper we wrote for the KDD 2013 PMML Workshop. For that, just follow the link below:

1) KDD Paper: The R pmmlTransformations Package

Also, make sure to check out the package's documentation from CRAN:

2) CRAN: pmmlTransformations Package

0 Comments

Article is closed for comments.
Powered by Zendesk