# Behavioral and Performance Analysis of a Real-Time Case Study Event Log: A Process Mining Approach
## 3 Methodological Framework for Applying Process Mining in Practice
### Data Pre-Processing
#### 3.3.2 Log Inspection and Cleaning
\begin{table}
\begin{tabular}{c c c} \hline SR\# & Activity & Frequency & Event ID \\ \hline
1 & Requisite recommendation I & 48,631 & 26.95\% \\
2 & Purchase requisite generation & 47,846 & 26.51\% \\
3 & Requisite budget confirmation & 40,932 & 22.68\% \\
4 & Unnamed activities & 33,136 & 18.36\% \\
5 & Purchase requisite approved I & 9590 & 5.31\% \\
6 & Requisite budget reservation & 313 & 0.17\% \\
7 & Purchased requisite approved II & 13 & 0.01\% \\
8 & Mark for procurement & 1 & 0\% \\ \hline \end{tabular}
\end{table} 
Table 2: Activities with their corresponding event IDs. activity name needs to be added, confusing what actual activity is performed. Out of the total of 43,101 cases, 27,383 cases containing 115,690 events have this quality issue. Among these events, 33,136 events have missing activity names. Thus, to avoid this confusion, these unnamed activities were removed. Table 4 represents the log data statistics after removing unnamed activities. **Incomplete Traces**  
In this issue, prefix and/or suffix events corresponding to a trace in the event log are missing, although they occur in reality. Due to these incomplete traces, there may be problems with the results produced by the process mining algorithms, as different relations may infer the start or end of the process. There are some algorithms to deal with this kind of noise, e.g., fuzzy miner. Another solution is to filter the log data to remove incomplete traces [22]. This study uses the endpoints filter during the analysis to remove incomplete traces. This filter selects the cases based on their start and end activities. This activity-based filter filters incomplete cases or trims the cases to cut out the parts of the process. Out of 147,326 events corresponding to 43,101 cases, there were 10,320 events corresponding to 33,926 cases with incomplete traces. After applying the endpoints filter to the data to remove the incomplete traces, the obtained filtered log consisted of 44,106 events corresponding to 9175 cases. As this filter is activity-based, not based on the time stamp, we applied another filter named 'filter log using simple heuristic' on the filtered log file. This filter combines many configurable log filters. The event-type filter, which allows choosing the kind of events or tasks we want to take into account while mining the log, is the initial log filter. The'start event filter' filters the log in such a way that only traces or cases that start with the selected tasks are kept. A frequency threshold of 80% was applied to select the most frequent start events. They cover 80% of the traces here. The third filter applied in our simple heuristic filter was the 'end events filter', which filters the log so that only the traces or cases that end with the indicated tasks are kept. The frequency threshold was set to 80 to select the most frequent traces%. The fourth filter was the 'event filter', which filters all unselected events from the log. Now, upon inspecting the resultant log, there were fewer cases, and all the cases started with the activity 'purchase requisite generation' and ended with the tasks 'purchase requisite approved I' and 'purchase requisite approved II'. After applying this filter on 44,106 events corresponding to 9175 cases, the resultant log consisted of 38,746 events corresponding to 8276 cases. Table 5 presents the statistics of the log after the removal of incomplete cases. \begin{table}
\begin{tabular}{c c c} \hline
**SR\#** & **Attribute** & **Statistics** \\ \hline
1 & Total no. of events & 147,326 \\
2 & Total no. of cases & 43,101 \\
3 & Total no. of event classes & 7 \\
4 & Maximum events per case & 35 \\
5 & Average events per case & 3 \\
6 & Minimum events per case & 1 \\
7 & No. of start events & 3 \\
8 & No. of end events & 6 \\
9 & Total no. of variants & 332 \\ \hline \end{tabular}
\end{table} 
Table 4: Statistics of log data after removing missing attributes. **Repetition of Activities**  
In log data, there can be events with the same activity name and event IDs within the same case.