# Investigating Social Contextual Factors
## 2 Materials and Methods
### Predictive Monitoring
Discriminative approaches infer a conditional probability \(\mathrm{P(Y|X)}\) from the training data set where \(\mathrm{X}=(\sigma_{1},\,\sigma_{2}\,\dots\,\sigma_{n}]\) denotes the set of feature variables and \(\mathrm{Y}=\{\tau_{\text{rem\_pred1}},\,\tau_{\text{rem\_pred2}}\,\dots\,\cdot \tau_{\text{rem\_predn}}\}\) represents the prediction target. The resulting probability distribution is used to make predictions for the test set. However, when there is a significant proportion of incomplete traces in the training data, this approach is not useful as the target (\(\mathrm{Y}\)), i.e., the remaining time for the trace, is unknown. This is the reason why these traces are typically removed from the training set. However, generative approaches, such as the survival analysis approach proposed, calculate a joint distribution \(\mathrm{P(X,Y)}\) which is then utilised to derive the conditional probability \(\mathrm{P(Y|X)}\). This approach can generate synthetic values of \(\mathrm{X}\) by sampling from the joint distribution. As a result, this approach performs better when an event log has a significant proportion of incomplete trace. In our experimental data, the percentage of incomplete traces ranged from 39% (BPIC 14) to 69% (BPIC 12). However, the survival analysis approach enables us to \"account for (incomplete traces (i.e., censored data)) in the analysis\" as this approach is able to extract information from them [34]. This is the main advantage of the approach we propose as it delivers better accuracy for event logs with a significant proportion of incomplete traces

To explore the effect of the proportion of incomplete traces on performance, we perform an additional set of experiment utilising a subset of data from a couple of event logs (BPIC12 and BPIC18), selected as they are on opposite spectrums of event log complexity (see [1]). Keeping the size of the event log constant, we incrementally increase the percentage of incomplete traces in the



To test this effect, we utilise the non-parametric Kruskal-Wallis to determine whether there is a significant difference in the MAE for each log. As expected, there is a significant difference in the MAE for both logs (For BPIC 12, \(p=3.282\times 10^{-9}\); for BPIC 18, \(p<2.2\times 10^{-16}\)). We subsequently run pairwise comparisons using Wilcoxon rank-sum test to determine which proportions differ significantly from the baseline (i.e., the log with 100% complete traces). Table 5 shows the results of the pairwise comparisons against the baseline. For BPIC 12, we notice that there is a significant difference until the point at which there is 40% incomplete traces (see results in bold). However, with BPIC 18, we notice that there is a significant difference between the MAE for all logs with incomplete traces against the baseline. To understand the results, we consider the event logs metrics (see Table 1). We observe that, despite having roughly the same number of events, BPIC 18 is more complex than BPIC 12 particularly in terms of mean trace length (\(\times 4\)) and the number of distinct activities (\(\times 6\)). We postulate that for complex event logs, our approach delivers a significant difference compared to the baseline, even when there is a high proportion of complete traces. However, for simpler logs, the difference is less pronounced, levelling out when there the proportion of complete cases approaches c.40%. ### Threats to Validity

We encoded the traces using an aggregation encoding technique to enable us to address the research question regarding which social contextual factors were the most important. However, we acknowledge that this encoding technique is quite lossy, which may adversely impact prediction accuracy. As such, we would recommend combining this with other encoding approaches for real-life use. Figure 8: BPIC 18—Normalised MAE by proportion of incomplete traces.