# Investigating Social Contextual Factors
## 2 Materials and Methods
### Predictive Monitoring
It is worth highlighting that, unlike the other logs, [25] had resources information at the team levels, so the handover of work was computed at a team rather than at an individual level. #### 2.5.2 Experimental Setup

As input into both sets of experiments, we created a social network from the handover of work from one performer to the next in each trace. We subsequently created an adjacency matrix and computed four grouped centrality measures--degree, betweenness, eigenvalue and closeness based on the approach recommended in [21]. In the initial sets of experiments, we performed some exploratory analysis by assigning each trace to a cluster using its four grouped centrality score. Before clustering the grouped centrality scores using a centroid-based clustering method (k-means), we empirically estimated the optimal numbers of clusters, k, from each dataset using the elbow method. We subsequently computed a survival curve for each cluster to visually determine how the grouped centrality scores impact the process cycle time. We subsequently created a case network to determine the relationship between these factors and case cycle times. We concluded by exploring the relationship between each group centrality measure and the cycle time. For the second set of experiments, we implemented a survival analysis predictive monitoring approach named survival in R (as described in Section 2.4) which enables evaluation of this approach vis-a-vis similar existing approaches. The code and data for the experiments are located in the following GitHub repository (see [[https://github.com/etioro/SocialNetworks.git](https://github.com/etioro/SocialNetworks.git)]([https://github.com/etioro/SocialNetworks.git](https://github.com/etioro/SocialNetworks.git))). We evaluated the survival analysis approach against two clustering-based remaining-time approaches identified in the literature (see [30; 31]) and a couple of methods which used a zero prefix-bucketing combined with a gradient boosting machine (\(gbm\)) and multilayer perceptron (\(mlp\)) neural network regressors respectively to predict the remaining time for each trace [14]. The same set of features were used to build and evaluate all the models in the experiment. We encode the traces as described in Section 2.4. Though this encoding is 'lossy', we adopt this approach as it enables us to capture the social contextual factors associated with each trace and adequately address the research questions

We split each event log into test and training sets (75:25 split, respectively), then used the training set to build the survival function and the test set for making remaining-time predictions, which are subsequently evaluated. As the survival curve gives a distribution of cycle time estimates, it was \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **BPIC 18** & **BPIC 17** & **BPIC 15(3)** & **BPIC 14** & **BPIC 12** \\ \hline Number of events & 267,830 & 233,928 & 59,681 & 277,577 & 262,200 \\ Number of cases & 3285 & 9453 & 1409 & 13,985 & 13,087 \\ Number of traces & 3277 & 5211 & 1350 & 13,942 & 4366 \\ Number of distinct activities & 141 & 26 & 277 & 39 & 24 \\ Mean trace length & 81.53 & 24.75 & 42.36 & 19.85 & 20.04 \\ Mean throughput time (days) & 580.63 & 24.11 & 62.23 & 12.93 & 8.62 \\ Throughput time SD (days) & 580.62 & 14.893 & 97.64 & 27.94 & 12.13 \\ Domain & Public Admin & Financial services & Public Admin & Financial services & Financial services \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Event Log Overview. necessary to determine an optimal quantile for estimating the cycle time. We explored the approach suggested by [8; 22] for selecting this quantile. This entails fitting a survival curve to the training set and determining which quantile minimised the MAE and RSME. This quantile is used to estimate the cycle time in the test set. However, we found that, compared to the median, this method performed poorly. Hence, we used the median as the optimal quantile for estimating the cycle time.