PMML Evaluator
The PMML Evaluator processor uses a machine learning model stored in the Predictive Model Markup Language (PMML) format to generate predictions or classifications of data.
With the PMML Evaluator processor, you can create pipelines that predict the existence of known patterns in your data and gain real-time insights. For example, you can design pipelines that detect fraud or needed maintenance as data passes through the pipeline.
The PMML Evaluator processor is available with a paid subscription. For details, contact IBM.
To use the PMML Evaluator processor, you first build and train the model with your preferred machine learning technology. You then export the trained model to a PMML document and save that file on the Data Collector machine that runs the pipeline.
When you configure the PMML Evaluator processor, you define the path to the saved PMML document stored on the Data Collector machine. You also define mappings between fields in the record and input fields in the model, and you define the model fields to output and the record field to store the model output.
Prerequisites
- Build and train a machine learning model with your preferred machine learning technology.
- Export the trained model as a PMML document. For more information, see the Data Mining Group website.
- Save the PMML document on the Data Collector machine that runs the pipeline. Store the document in the Data Collector resources directory, $SDC_RESOURCES.
- Install the PMML stage library on the Data Collector machine.
Installing the PMML Stage Library
To use the PMML Evaluator processor, you must have a paid subscription and install the PMML stage library.
PMML Model as a Microservice
External clients can use a model saved as a PMML document to perform computations when you include a PMML Evaluator processor in a microservice pipeline.
For example, in the following microservice pipeline, a REST API client sends a request with input data to the REST Service origin, labeled PMML Model Serving Service. The PMML Evaluator processor uses a machine learning model to generate predictions from the data. The processor passes records that contain the model's predictions to the Send Response to Origin destination, labeled Send Predictions, which sends the records back to the REST Service origin. The origin then transmits JSON-formatted responses back to the originating REST API client.
Example: Iris Classification
For example, suppose you build and train an Iris classification model and save the model in PMML format. The model predicts the species of Iris based on length and width measurements from a flower's petal and sepal.
{
"petalLength": 6.4,
"petalWidth": 2.8,
"sepalLength": 5.6,
"sepalWidth": 2.2
}
Output field | Value |
---|---|
Predicted_Species | virginica |
Probability_setosa | 0.0 |
Probability_versicolor | 0.12 |
Probability_virginica | 0.88 |
To include this model in a pipeline, save the model document on the Data Collector machine, add the PMML Evaluator processor to the pipeline, and then configure the processor to use the PMML document and to map the required input fields and generated output fields to fields in the record. The following image shows the processor configuration: