In this POC we will learn how to import an external AI model and how to configure the same in Pega so that we can take a decision. I have used a Fraud model of H2O.ai
Login to your Pega Personal Edition (8.7)
Go to Prediction Studio [If you are not able to the Prediction studio then go the access group of your application and in available portal section add pxPredictionStudio]
Click New [Right hand top corner blue button]
Select Case management and Click Next
To get – Subject = Claim (First Create a Data Type as Claim in Dev Studio)
Now Predict Fraud has been added
Click Predict Fraud
Now in the next window click Models tab beside Notifications
After Clicking Models you will get the below screen and then click more (3 vertical dots) and Replace model
Select Model in the next screen
In the next screen uncheck the check box Compare Models and choose the file FraudH20.zip
This file H2O.zip will be provided by external system. This can be PMML file also. Data scientist will create this file for you. In this case we are using external models. We can create our own model in Pega also. Predictive model or Adaptive model as part of Pega CDH and use those models.
Give a Name to the Model
It will show Configuration in Progress, after few secs it will show Ready for Review
Now Click FraudH2O(M-5001)
Now Click Mapping
Look at the Fields that you have added in the Claim Data Type in Dev Studio
Now Click Evaluate on top right corner, you will get the below dialog box
In the upper-right corner, click Evaluate to open the Evaluate FraudH20 dialog box.
Ensure that Approve candidate model and replace current active model is selected.
In the Reason field, enter the appropriate information (for example, Would like to use an H2O.ai predictive model instead of a scorecard), and then click Save.
Confirm that the FraudH2O model replaces the placeholder scorecard as Active in the prediction.
So the new model has been activated
Click FraudH2O to open the model.
- In the upper-right corner of the predictive model, click Run to run the model.
- In the Run predictive model dialog box, enter the predictor values as shown in the following image:
In the Outputs section, confirm that the model predicts fraud with a high propensity and that the claim is abnormal.
Close the Run predictive model dialog box.
In the lower-left corner, click the user icon, and then select Log off to log out of Prediction Studio. Now go to the App Studio and then create a FraudCase Case type as below.
Now go to the Settings tab — > Predictions –> Add Predictions
On the Workflow tab, in the Detect fraud stage of the case type life cycle, click the Decision icon to open the properties pane.
In the properties pane on the right, to the right of the When list, click the Gear icon to edit the condition that routes the claim to a fraud expert.
In the Configure condition window, click the first field in the ClaimedAmount row, and then select
Predictions > Predict Claim Fraud > Segment.
Configure the condition to read Segment is equal to “abnormal”.
Click Submit to close the dialog box.
Predictions> Predict Claim Fraud > Segment.
Now Save and Run the case
We can see that the claim has been detected as Fraud and its status is Pending-Investigation.
You may think, we can do all these through Decision Table / Tree or even using When rule but these AI models are very powerful and can handle many attributes. In an Enterprise level application with many different conditions to find Fraud these AI models can surpass the Decision Table / Tree / When rules.
More more details you can read articles in pdn.