# Investigating Social Contextual Factors
## 2 Materials and Methods  
### Definitions  
#### 2.1.1 Event, Traces and Event Logs  
Several key terms to be built on throughout this review are formally defined. We adopt the standard notation defined in [1]. **Definition 1**. : _Event. Let \(\varepsilon\) represents the event universe and \(T\) the time domain, \(A\) represents the set of activities, and \(P\) represents the set of performers (i.e., individuals and teams)._  
An event \(e\) is a tuple (#case_identifier(\(e\)), #activity(\(e\)), #start_time(\(e\)), #completion_time(\(e\)), #attribute1(\(e\)).#attributen(\(e\))). The elements of the tuple represent the attributes associated with the event. Though an event is minimally defined by the triplet ((#case_identifier(\(e\)), #activity(\(e\)), #completion_time(\(e\))), it is common and desirable to have additional attributes such as #performer(\(e\)) indicating the performer associated with the event and #trans(\(e\)) indicating the transaction type associated with the event, amongst others. For each of these attributes, there is a function which assigns the attribute to the event. e.g., \(\text{attr}_{\text{start\_time}}\in\varepsilon\to T\) assigning a start time to the event, \(\text{attr}_{\text{completion\_time}}\in\varepsilon\to T\) assigning a completion time to the event, \(\text{attr}_{\text{activity}}\in\varepsilon\to A\) assigning an activity label to the event and \(\text{attr}_{\text{performer}}\in\varepsilon\to P\), a partial function assigning a performer (or resource) to events. Note that \(\text{attr}_{\text{performer}}\) is a partial function as some events may not be associated with any performers. An event is often identified by the activity label (#activity(\(e\))) which describes the work performed on a process instance (or case) that transforms input(s) to output(s). **Definition 2**. : _Terminal activities. Let \(Z\subseteq A\) represent the set of valid terminal activity labels._  
where \(e_{n}\) is a valid terminal event if #activity_label(\(e_{n}\)) \(\in\) Z. This event indicates a 'clean' completion of the process instance. Otherwise, the process instance is still in-flight or abandoned. **Definition 3**. : _Trace. A trace is a (time-increasing) sequence of events, \(\sigma\in\varepsilon*\) such that each event appears only once, i.e., for \(1\leq i<j\leq|\sigma|\): \(\sigma\)i \(\
eq\)\(\sigma\)j and \(\overline{\sigma_{i}}\leq\overline{\sigma_{j}}\)._  
A partial trace (\(\sigma^{j}\)) has a non-valid terminal event as the final event (\(e_{n}\)). It indicates an in-flight (pre-mortem) process instance. A full trace (\(\sigma^{j}\)) ends with a terminal event (\(e_{n}\)). It details the journey through the value chain that the particular process instance followed and indicates a completed (post-mortem) process instance. **Definition 4**. : _Censored traces. Let \(C\) represent the set of all possible traces and #censored(\(\sigma\)) represent a binary variable indicating whether a trace is censored or not respectively. A function \(\mathrm{attr}_{\mathrm{censored}}\in\mathrm{C}\rightarrow\{1,0\}\) which assigns the appropriate value to a trace is defined as follows:_  
\[\#\mathrm{censored}(\sigma_{i})=\left\{ \begin{array}{ll}1,&|\ \ \#\mathrm{activity\_label}(e_{n})\in Z\\ 0,&|\ \ \#\mathrm{activity\_label}(e_{n})\
otin Z\end{array} \right. \tag{1}\]  
**Definition 5**. : _Event log. An event log is a set of traces (full and partial) \(\mathrm{L}\subseteq\mathrm{C}\) for a particular process such that each event appears at least once in the log, i.e., for any \(\sigma_{1}\), \(\sigma_{2}\in L:\ \forall e_{1}\in\sigma_{1}\forall e_{2}\in\sigma_{2}e_{1} \
eq e_{2}\) or \(\sigma_{1}=\sigma_{2}\)._  
**Definition 6**. : _Remaining time. Let \(\sigma^{j}\) represent a full trace, \(\tau.e_{n}\) represent the completion time associated with the terminal event, #completion_time(\(e_{n}\)), and \(t\) represents the prediction point. For \(t<\tau.e_{n}\), the remaining time \(\tau_{rem}=t-\tau.e_{n}\). It indicates the remaining time to completion of case/process instance.