Step 3 – Predicting using the trained model

Open the Calculate Rest. Forecast ML codeunit and find the Predict() function. Let's see how it works:

  1. Check that you have the trained model in place:

  1. Specify the connection to your published predictive ML web service:

  1. Generate a temporary table with data (features), which will be used to get orders (predictions). The structure of this table should be the same as the table you used in the training process. Otherwise, the Prediction web service will not work properly.
  2. Then, pass this table to the ML web service input. It's important to understand that predictions will be calculated for each record (row) of the passed table:

  1. Specify which fields from the table will be the features. List them in the same order as when you trained the model. Otherwise, the Prediction web service will not work properly:

  1. Specify which field from the passed table will be a label. Use the same field that you used when you trained the model. You can only mention one field here:

The ML Prediction API can make predictions using classification or regression algorithms. You don't control that. If the label field has a type of integer or decimal, then the regression tree algorithm, annova, will be applied. Otherwise, it will use a classification algorithm.

If you predict values using classification algorithms, then you can also specify a field to save the confidence percentage of the prediction. This isn't supported for the regression algorithm.

Predict values using the Predict function and pass the trained ML model:

Save the forecast result:

You now have forecast data to check.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.145.114