Train predictive models
Apromore now allows us to train predictive machine learning models from an event log, analyze the quality of these models, and generate predictions.
Given an event log, we can train a machine learning model to predict:
The remaining time of an ongoing case until its completion.
Whether an ongoing case will reach a given outcome or not, for example, will a case in a price quotation process reach a state where the customer places an order or will an order-to-cash process reach a state where the customer returns the product.
To train a predictive model, right click on the log and click Predictions > New predictor.
Note
As an alternative, select the log and click the info icon to display the assets panel. Click Predictions > New predictor.
The Predictor trainer window opens, containing 3 tabs: Train - Validate - Explain. Train is opened by default.
Type the Predictor name. This is the name of the attribute that will be predicted. Select the Prediction type. As earlier mentioned, there are two prediction types: Case outcome and Remaining time.
Define the Target attribute. This is the attribute we want to predict.
When we select Remaining time as the prediction type, we do not need to specify the target attribute. The target attribute is internally set to be the end timestamp.
In Input attributes, we specify the attributes that will be used to train the model. By default, all the attributes present in the log will be selected. This means that Apromore will train the model based on all the attributes in the log. To select specific attributes, select Select attributes and tick the attributes that would be used for training.
When we are training a case outcome and a target attribute is specified, it is recommended not to add that attribute as the input attribute. For instance, if we specify the target attribute to be “Discount_Type”, “Discount Type” should not be selected as an input attribute.
Click Train predictor. A pop-up message stating the status of the training will appear. The status is also displayed in the upper right corner of the Predictor Trainer window, right beneath the user details.
Note
Active status written in green means that the predictor is ready to be used. Failed status written in red means that some error occurred during the training. The log should be rechecked. Training status means that the predictor is getting prepared to be used. Depending on the size of the log, it may take some time to generate the predictor.
When the training is complete, the status changes to Active.
To check the accuracy of the predictor, switch to the Validate tab. We can change the Validation type by clicking on the corresponding arrow and choosing from the drop-down list of available types.
We can also change the metric displayed. By default, the Mean absolute error (MAE) is used for a numerical variable. Click the drop-down to change it.
To analyze the logic behind the predictor deeply and check which attributes were used for the predictions, switch to the Explain tab.