Recommendation ML models create lists of objects (recommendations) that are likely to be linked to the “subject” records (the recipients of recommendation). For example, you can recommend products to your customers based on known purchases of other similar clients or purchases of similar products.
This method of training product recommendation models is called collaborative filtering. The collaborative filtering model uses the subject’s known preferences, as well as data about the preferences of other subjects that are similar to the target subject.
To predict the preferences, Creatio uses an item-based algorithm. Creatio summarizes and ranges the data about the interaction with the recommendation objects and creates recommendation lists.
Case
Set up a machine learning model that would recommend products that a customer would most probably purchase.
I. Create a recommendation model
To create a product recommendation model, open the [ML models] section in the System Designer, click [New model] and populate the ML model mini page (Fig. 1):
1.[Name] – enter the name of the prediction model that will help you easily identify it in the list of the [ML models] section and when selecting the model for the [Data prediction] process element.
2.[Type] – specify the ML model type. In our example, it is “Recommendation”. As a result, the [Object] field changes to [Recommendation dependency].
3.[Recommendation dependency] – select the object that maintains a connection between the recommendation subject (in our case, the customer) and the recommendation object (in our case, the product). For example, the connection of the customer to the product is implemented through the “Product in order” object. When you select the connecting object, additional fields appear in the mini page.
4.Recommended to (Subject) – specify the subject of the recommendation. The recommendation subject is a Creatio record, for which the list of recommended objects is generated. In our example, the products will be recommended to the contacts specified in the order. Click “+” and select the [Order] object, then the connected [Contact] object (Fig. 2):
5.[Recommended object] – select the recommendation object. In our example, it is the [Product] column of the “Product in order” object (Fig. 3):
6.[Recommendation dependency column] – select a numeric column in the section, detail, or lookup specified in the [Recommendation dependency] field. This column will be used to grade the “quality” of dependency between the recommendation subject and the recommended object. For example, the number of products ordered by contact is a quality of dependency between the corresponding contact and different products. Thus, if you select the [Quantity] column, the more products a contact buys, the “stronger” the contact’s dependency with the recommended object is, making this a more significant connection that warrants future recommendations.
The field is not required. If you do not populate the field, the connection between the subject and the object will be presented in a binary way: “0” – connection does not exist; “1” – connection exists.
7.Click [Next] to save the mini page and open the product recommendation model setup page.
II. Product recommendation model parameters
Once you populate the initial fields, click the [Parameters] tab and specify additional model parameters (Fig. 4):
1.[Which records should be included in the training dataset?] – set up a filter that Creatio will use for selecting records to train the model. For example, narrow down the training data range to products from the completed orders only. You can leave the filter conditions unpopulated. This will result in Creatio using all available records for training the model.
Note
At this stage, you already can save and train the model by clicking the [Train model] button. You will see the training results in the [Expected accuracy] field. To save the prediction results, populate the [Setting up saving prediction results] detail.
2.[Automatic model training settings] – switch the slider to the right and set the automatic model training parameters based on the updated historical data.
a.In the [Retrain after, days] field, specify the interval between model training sessions. After the specified number of days, the model will be retrained based on historical data using the records that match the filter. The first training of the model starts when you click the [Train model] button. If you do not want to retrain the model, leave the field blank or enter “0.”
b.In the [Quality metric lower limit] field, specify the lowest quality metric of the prediction model. When the model is trained for the first time, this threshold will determine the minimum acceptable quality that the model needs to reach before it can be used in Creatio. If the quality of a model drops below the lower limit, the model is deemed unusable. We recommend setting the quality metric lower limit to at least 0.50. The accuracy score of the machine learning model ranges from 0.00 to 1.00 (1.00 being the highest, and 0.00 being the lowest). The accuracy of machine learning models is calculated by dividing the number of successful predictions by the total number of predictions to evaluate the success rate of its learning patterns. You can use the following article to learn more about how the prediction accuracy score is calculated.
3.[Setting up saving prediction results] – specify where the prediction result will be stored in Creatio. You can save the prediction in any Creatio object that contains the required fields. For example, you can add a [Product recommendations] detail to a contact page. Learn more about creating and adding new details to record pages in the “Create new detail” article.
a.In the [Object] field specify the object that will store the recommendations. It is usually a detail. Note that you can only specify an existing object in Creatio. In our example, you can specify the [Product recommendations] detail that we configured and added earlier. The object must contain the [Recommended to (Subject)] and [Recommended object] fields. The product recommendation model will add records to the object specified in the [Object] fields and populate the fields as described in steps ‘b’ through ‘f’.
When you select an object, the [Recommended to (Subject)] and [Recommended object] fields become required.
Note
Learn more about creating and adding new details to record pages in the “Create new detail” article.
b.The [Recommended to (Subject)] field is populated automatically. You can modify the value, if necessary. For our example, specify [Contact] in this field. The field is required
c.The [Recommended object] field is populated automatically. You can modify the value, if necessary. For our example, specify [Product] in this field. The field is required
d.The [Probability] field is populated automatically. Creatio selects a “Decimal” type column of the prediction detail configured earlier. You can change the value, if necessary, by selecting another column of the appropriate type from the drop-down list. The field is used to range the records. In our example, the higher the column value is, the more probable it will be to reach the opportunity success.
e.The [ML model] field is populated automatically. Creatio selects a “Lookup” type column of the prediction detail configured earlier. You can change the value, if necessary, by selecting another column of the appropriate type from the drop-down list. We recommend populating this field if you use several different prediction models.
f.In the [Prediction date] field, specify the date when the prediction took place by selecting a “Date” type column of the prediction detail configured earlier.
III. Advanced settings of the product recommendation model
Click the [Advanced settings] tab if you want to specify additional prediction model parameters.
1.Use the [Advanced tools to add columns] detail to set up a query for the selection of additional columns that the predicted value depends on. Note that creating queries requires coding. Learn more in the “Creating data queries for the machine learning model” article.
2.The fields in the [Advanced model parameters] detail (Fig. 5) are populated automatically. You can edit them and change their numeric values, if necessary.
a.[Training dataset minimum size] – the minimum number of records needed for training a model.
b.[Maximal training records count] – the maximum number of records needed for training a model.
c.[List of factors count] – a pre-configured list of metric numbers for each recommendation object and subject used by Creatio to analyze and prepare recommendations.
d.[List of regularization values] – a pre-configured list of numbers of additional restrictions added by Creatio to minimize errors and avoid model re-trainings.
Note
Creatio will train the models based on each of the values from the [List of factors count] and [List of regularization values] fields to define the combinations of numbers for factors and parameters that would provide the most accurate prediction. The values that provide the highest prediction accuracy will be used to train the model.
3.Click [Save]. To start training a product recommendation model, click [Train model].
You can track the prediction accuracy in the [Expected accuracy] field. The value in this field shows the “quality” of the model training by the NDCG metric and enables comparing different models. Learn more about the NDCG metric in Wikipedia.
As a result, a new model will be added and you will be able to use it for running processes that predict recommendations for the selected Creatio objects.
Learn more about business processes for predictive analysis in the “Configure a prediction business process” article.
In our example, the product recommendation model will analyze data on the interaction of the recommendation subject as well as other similar subjects with the [Product in order] object and generate a list of corresponding recommendations in the corresponding object, e.g., the object of the custom [Recommended products] detail. The selection of records for training will be restricted by the completed orders. The list of recommendations will be ranged based on the number of purchased products.
As a result, the custom [Recommended products] detail of the selected contacts’ pages will display the recommended products (Fig. 6):
See also
•Basic predictive analysis glossary
•Numeric field value prediction