Predictive Model rule form
|
|
From the Configurations tab, you can define undefined functions in a PMML model. You need to use Java code for this.
Note: This tab is available only when the uploaded PMML model contains undefined functions.
When you upload a predictive model file (a PMML file), the system scans the source file and looks for the applied functions and their definitions. If undefined functions are found, the function names are listed in the Errors section on the Predictive model tab.
PMML functions transform data in PMML models. These models include several predefined functions that are defined as Java code in the Pega PMML execution engine. In addition to the predefined functions, PMML producers sometimes use proprietary expressions (functions) with the PMML models that are not part of the models themselves. These functions are used for various reasons (such as performance or enhancements). In this case, the model contains undefined functions (the model contains only references to the functions and their parameters).
When you use custom functions, remember that a function takes a list of objects as argument. The order and type of the arguments is the same as defined in the PMML source definition. The output of the function must be the same type that is defined in the PMML source definition. Where applicable, you can use Java primitive types instead of the corresponding objects.
Select the appropriate ruleset, library, and function that implement the custom function logic.
The rulesets and libraries are appropriately filtered to reflect the current application context.
Click Designer Studio > Application > Distribution > Import.
Import a JAR file with the proprietary expressions (functions) that you want to use with the PMML model.
Return to the Configurations tab.
Provide a name of the implementation class and method that are available in the JAR file.
The Implementation class refers to the fully qualified name of the class implementing the function.
Save the changes and restart the Pega 7 Platform.