Posted: 14 Jan 2021 11:20 EST Last activity: 21 Jan 2021 16:40 EST
Reference Adaptive Model propensity in strategy via java function
I am looking at ways to reference adaptive model propensity using a java function, from within a strategy. The reason is to have models created but not connected in the strategy, instead to call up and use the propensity result for further use. This way the models can be switched, say using a decision data attribute depending upon the proposition being served up.
I have looked at Activity: Example call to pxGetPredictionCasePega-DecisionEngine:07-10-33, and understand the call to the pxGetPredictionCase activity. The first step in this example call is to "Create inputs page for model in DMSample initial data" step which creates pyModelIdentifiers & pySerializedADMInputs with dummy data (for inputsPageName, see further)
I want to have these referred from the actual model. As an example, an adaptive model called ADM001 has been created with 60 predictors.
pxGetPredictionCase has 4 parameters: ruleName, appliesTo, inputsPageName & resultsPageName
Creating the inputs page is tricky and I would appreciate any help I can get.
I have had people suggesting to drop this approach but for the purpose of doing something differently I would like to attempt it. Happy to hear thoughts (& solutions) for both sides though.
I may not understand your question 100%, but it's OK to put an adaptive model shape in a strategy and then not connect it. You can refer to the propensity it returns where needed from any other component (for example in an expression) or save the propensity in a strategy property for further use.
But perhaps you can expand on the details of the further use and also the reason why you wouldn't want to connect?
Posted: 1 month ago
Updated: 1 month ago
Posted: 15 Jan 2021 9:46 EST Updated: 18 Jan 2021 4:44 EST
The requirement is to avoid updating the strategy, and only create adaptive models at group level, for different groups. The idea was to have a set property component that references a property .ADM_ID (containing ADM001, ADM002...numerical sequence introduced as necessary), in-order to refer to the propensity returned by the respective adaptive model programmatically. This would allow separate adaptive models to influence different groups of propositions, and also allow the models to be added easily when needed.
Although the models will not be created frequently, with a solution like this the management of models/decision data can be separated from strategy build.
The java & activities example I mentioned earlier seemed to offer a way but not quite.
I have attached some pictures to support my query.
Unfortunately, I can't seem to open the .png attachments (tried two different browsers).
You should be able to use a strategy, this is also the only available way to create adaptive model instances. The adaptive model component(s) on the strategy canvas can refer to different adaptive model rules. if you would like to have group level models, one of these could have context identifiers pyIssue and pyGroup, and not pyName, . You can 'chain' these with models keyed on both pyIssue, pyGroup and pyName, so that a single response will capture feedback on both models.