Predictive intelligence on client side not populating prediction results table?

Liyakhat
Mega Sage

Hi

 

I tried to run Predictions on client side and was successfull following below article

https://www.servicenow.com/community/ai-intelligence-articles/in-predictive-intelligence-how-to-get-...

But i observed its not populating prediction results table to view in reports

Any possible way to populate the table prediction results using client side predictions

@Pradyumna Das @Brian Bakker 

1 ACCEPTED SOLUTION

Brian Bakker
ServiceNow Employee
ServiceNow Employee

@Liyakhat  
You should use the applyPrediction method to populate the Prediction Results table. Here is an example -

 

var mlSolution = sn_ml.MLSolutionFactory.getSolution("ml_incident_categorization");
var inputGR = new GlideRecord("incident");
inputGR.get("0ef47232db801300864adfea5e961912");
mlSolution.applyPrediction(inputGR);  

Regards,

Brian

View solution in original post

5 REPLIES 5

Brian Bakker
ServiceNow Employee
ServiceNow Employee

@Liyakhat  

You can also use the SolutionStats API to record the predicted values into the ml_predictor_results table.

 

/ This below line of code will set the predictions in ML Predictor table
sn_ml.SolutionStats.recordPredictValues(results, solution);