## 4 Framework
### Visualisations to Support Model Interpretability  
The last part of the proposed framework is an approach for visualising the rules used for outcome prediction in a more interpretable way. Although association rules are inherently interpretable and a basic interpretation of rules can be operated domain experts by skimming through a printed list of rules, having a means to visualise effectively the rules can dramatically increase their interpretability by human decision makers [29]. The rules defining an outcome-based process predictive monitoring model can be visualised at two levels:  
* _Global level_. At the global level, the objective is to give to decision makers an idea of which features of the data define the behaviour of a predictive model. Therefore, at the global level we aim at providing an interpretable way to quickly understand the components of the rules of the predictive model, i.e., the features involved in the antecedents and consequents of the rules. * _Local level_. In explainable outcome-based predictive monitoring, the local level refers to interpreting the behaviour of a predictive model for an individual process trace [17]. Hence, we propose a way to visualize, for a single trace at a given prefix, the rules that are activated to obtain a prediction and the features of the trace that trigger the activation. Global level visualisationAt the global level, the visualisation of rules that we propose is based on the following principles:  
* A network graph is built for one event log at a given prefix length for each label, i.e., considering the rules generated by the model trained with the prefixes at that prefix length and for which the prediction evaluated to that particular label (0 or 1);
* Owing to the fact that each graph represents all the rules for a given label, each graph is built only with information related to the antecedents of the rules; in particular, each node in the graph is an item (that is, a feature associated with a possibly discretised value) that appears in at least one rule and edges connect two items (nodes) that appear together in the antecedent of a rule;
* The thickness of nodes represents the frequency of appearance of an item in the rules relative to the total number of items in the antecedents of the rules;
* To facilitate the interpretation and the identification of items, four types of items are identified and different colours are assigned to the corresponding nodes in a graph: items derived from an _activity_ label of an event, from _timestamps_, from other _case-level attributes_, or from other _event-level attributes_;
* The thickness of the edges in the graph represents the relative frequency at which the two nodes linked by an edge appear together in one rule, relative to the total number of rules. Local level visualisationAt the local level, the objective is to understand the rules that have been activated to obtain the value of the predicted label, emphasising in particular the attributes that triggered the activation of the rules. The local level visualisation consists of 4 visual elements:  
1. Case information;
2. Case-level attribute information;
3. Trace-level attribute information;
4. Association rules. The case information elements shows the case id, the predicted outcome, and the actual outcome of a case to which the trace (prefix) for which a prediction has been obtained belongs. The case- and trace-level attribute elements show the values assumed in the trace by the features of the predictive model derived from the event log attributes. Finally,the last element shows the association rules of the model, highlighting (in blue) the ones that have been activated to obtain the prediction, i.e., the ones for which the antecedents evaluate to 1. Note that the attributes responsible for the activation of the rules are also highlighted using the same colour.