The other day I stumbled accross an amazing PMML model API called jpmml. It’s written in Java and supports PMML 4.1 (and older). Neural networks, random forests, regression and trees PMML models can be consumed and used for scoring.
I decided to write a REST interface that wraps the jpmml engine. This allows remote clients, written in just about any language, to have a simple interface to “cloud” scoring.
You can develop your predictive models in R, export them to PMML and score the models directly from client applications. I’m a big fan of Rattle for the first two steps.
OpenScoring can be dowloaded from http://code.google.com/p/openscoring/.
To install the OpenScoring web application in Tomcat, copy the OpenScoring.war file to the $TOMCAT_HOME\webapps directory.
To invoke the scoring service, you perform an HTTP POST to http://localhost:8080/OpenScoring/Scoring. The format of the post is XML. Here is a sample POST to score against a Neural Network PMML model using the well-known iris data set.
Here is the sample XML input:
The pmml_url element is a http, file or ftp URL that points to the PMML XML file. The csv_input_rows element contains the records to score. The rows are comma separated values with pipe delimited rows.
Here is the response XML: