Zementis Support Team September 4, 2015 •Predictive Model Markup Language (PMML) / PMML Support in R
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:
Dummy-fication of categorical variables
If you would like to contribute code to the pmmlTransformations package, please feel free to contact us.
The released package version 1.3 has new functions to translate arbitrary mathematical expressions into a PMML representation. These new functions are:
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:
With the use of the pmmlTransformations package, transform the raw input data as appropriate
Use transformed and raw data as inputs to the modeling function/package (hclust, nnet, glm, ...)
Output the entire solution (data pre-processing + model) in PMML using the pmml package
Example - sequence of R commands used to build a linear regression model using lm with transformed data
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:
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
svm (e1071): Support Vector Machines
The new pmml package offers additional features:
Add and insert arbitrary attributes to already created PMML models
Add and insert arbitrary elements to already created PMML models
Create various child elements allowed in the PMML schema so as to add them using the above functions
Such elements include DataField, Output, OutputField, Interval, Value
The pmml package can also export data transformations built with the pmmlTransformations package (see below). It can also be used to merge two disctinct PMML files into one. For example, if transformations and model were saved into separate PMML files, it can combine both files into one, as described in Chapter 5 of the PMML book - PMML in Action.
How does it work?
Simple, once you build your model using any of the supported model types, pass the model object as an input parameter to the pmml function as shown in the figure below:
Example - sequence of R commands used to build a linear regression model using lm and the Iris dataset:
For more on the pmml package, please take a look at the paper we published in The R Journal. For that, just follow the link below:
Support Team July 10, 2014 •Zementis Products / ADAPA
By using the AWS Marketplace, ADAPA users can benefit from using the AWS Management Console to launch one or more ADAPA instances on the Amazon Cloud. Users can also do that by benefiting from the 1-Click Launch feature provided by the AWS Marketplace.
In this posting we cover:
Initial log in into ADAPA - finding the initial password and changing it
How to ssh into the ADAPA instance
Watch our how-to video
Initial log in into ADAPA
In both cases, once the ADAPA instance is up and running, users can then access ADAPA directly through its Web Console. To log in the first time around into ADAPA though, users need to provide the Instance ID as the initial password (password can then be changed later on as depicted below).
If the ADAPA instance was launched through the AWS Management Console, the Instance ID (the initial password) can be obtained from the Instances table itself:
Note that to access the ADAPA Console, you will need to copy and paste the Public DNS for the instance you just launched into a new tab of your Web browser. Remember to type https:// in front of the Public DNS. In this case, if the Public DNS for your instance is ec2-54-81-130-28.compute-1.amazonaws.com, you will need to type the following in your Web browser:
Support Team June 23, 2014 •Predictive Model Markup Language (PMML) / About PMML
Alex Guazzelli, Zementis CTO, wrote a four-part article series about predictive analytics entitled Predicting the Future. The four articles have been published by IBM in their entirety in the developerWorks website. They are: