Chapter 3. PMML support in Red Hat Decision Manager
Red Hat Decision Manager includes consumer conformance support for the following PMML 4.2.1 model types:
For a list of all PMML model types, including those not supported in Red Hat Decision Manager, see the DMG PMML specification.
Red Hat Decision Manager does not include a built-in PMML model editor, but you can use an XML or PMML-specific authoring tool to create PMML models and then integrate the PMML models in your decision services in Red Hat Decision Manager. You can import PMML files into your project in Business Central (Menu → Design → Projects → Import Asset) or package the PMML files as part of your project knowledge JAR (KJAR) file without Business Central.
When you add a PMML file to a project in Red Hat Decision Manager, multiple assets are generated. Each type of PMML model generates a different set of assets, but all PMML model types generate at least the following set of assets:
- A DRL file that contains all of the rules associated with your PMML model
At least two Java classes:
- A data class that is used as the default object type for the model type
RuleUnitclass that is used to manage data sources and rule execution
If a PMML file has
MiningModel as the root model, multiple instances of each of these files are generated.
For more information about including assets such as PMML files with your project packaging and deployment method, see Packaging and deploying a Red Hat Decision Manager project.
3.1. PMML naming conventions in Red Hat Decision Manager
The following are naming conventions for generated PMML packages, classes, and rules:
If no package name is given in a PMML model file, then the default package name
org.kie.pmml.pmml_4_2is prefixed to the model name for the generated rules in the format
The package name for the generated
RuleUnitJava class is the same as the package name for the generated rules.
The name of the generated
RuleUnitJava class is the model name with
RuleUnitadded to it in the format
Each PMML model has at least one data class that is generated. The package name for these classes is
The names of generated data classes are determined by the model type, prefixed with the model name:
Regression models: One data class named
Scorecard models: One data class named
Tree models: Two data classes, the first named
modelName+"TreeNode"and the second named
Mining models: One data class named
- Regression models: One data class named
The mining model also generates all of the rules and classes that are within each of its segments.
3.2. PMML extensions in Red Hat Decision Manager
The PMML specification supports
Extension elements that extend the content of a PMML model. You can use extensions at almost every level of a PMML model definition, and as the first and last child in the main element of a model for maximum flexibility. For more information about PMML extensions, see the DMG PMML Extension Mechanism.
To optimize PMML integration, Red Hat Decision Manager supports the following additional PMML extensions:
modelPackage: Designates a package name for the generated rules and Java classes. Include this extension in the
Headersection of the PMML model file.
adapter: Designates the type of construct (
trait) that is used to contain input and output data for rules. Insert this extension in the
Outputsection (or both) of the PMML model file.
externalClass: Used in conjunction with the
adapterextension in defining a
OutputField. This extension contains a class with an attribute name that matches the name of the