## 3 Chaotic Activity Filtering Approach Based on Direct Following Relationship
### Direct Chaotic Activity Filtering
For activity \(x\), the calculated result is greater than the average value, so it is judged that the candidate chaotic activities are \(x\). **Condition (2):** Chaotic activities in logs often have both direct following relationships and direct preceding relationships with more activities in the log. Accordingly, the amount of activities in the event log that have both a direct following relationship and a direct preceding relationship with a certain activity can be counted to calculate the chaos degree of the activity. That is, for activity \(p\), let the event log be \(L\), and the sum of the number of elements in the set be counted as the degree of chaos in activity \(p\). If the chaos degree of activity \(p\) exceeds the set threshold, it is judged that \(x\) is a candidate chaotic activity. \[S_{3}=\left\{q\middle|\forall_{q\in ActSet(L)}(\#(<p,q>,L)>0)\ \land(\#(<q,p>,L)>0)\right\}\]  
Take the log \(L=[<\)_a,b,c,d,x>\({}^{10}\),<a,b,x,c,d>\({}^{10}\),<a,x,b,c,d>\({}^{10}\)_, \(<\)a,x,b,c,d>\({}^{10}\)_] as an example, and use Table 1 to calculate activity \(x\). First of all, for activity \(x\), find the activities that have both a direct following relationship and direct preceding relationship with x in the relation table, and find that #(\(<\)_x,b\(>\),L_), #(\(<\)_b,x\(>\),L_) are all greater than 0, and the values of #(\(<\)_x,c\(>\),L_), #(\(<\)_c,x\(>\),L_) are all greater than 0, and the values of #(\(<\)_x,d\(>\),L_), #(\(<\)_d,x\(>\),L_) are all greater than 0. So for activity \(x\), the collection of activities that satisfy the conditions is \(\{b,c,d\}\). This calculation is performed for all activities in the log, and the corresponding results of each activity are obtained, and the average value of all results is obtained. In this log, the average value is 1.2. The result of activity \(x\) is greater than the average, so it is judged that the candidate chaotic activity is \(x\). **Condition (3):** If there are both direct following relationships and direct preceding relationships between a certain activity and additional activities, and the difference between the direct following frequency and the direct preceding frequency is small, the activity is judged to be chaotic. The average value of the direct following frequency and the direct preceding frequency between two activities can be set as the threshold to judge the gap between them. Therefore, activities that have both a direct following and direct preceding relationship with a certain activity can first be counted in the log to form an activity set. Then, in this set, the activities with a small difference between the direct following frequency and the direct preceding frequency between the activities are counted to form the activity set. Finally, the number of activities in the activity set can be counted to calculate the chaos degree of the activity, i.e., for activity \(p\), let the event log be \(L\), and the sum of the number of elements in the set \(S_{4}\) be counted as the degree of chaos in activity \(p\). If the chaos degree of activity \(p\) exceeds the set threshold, it is judged that \(p\) is a candidate chaotic activity. \[S_{4}=\left\{ \begin{array}{l}q\middle|\forall_{q\in ActSet(L)}(\#(<p,q>,L)>0 )\ \land(\#(<q,p>,L)>0)\land\\ \left(\left|\#(<p,q>,L)-\#(<q,p>,L)\right|<\frac{\#(<p,q>,L)+\#(<<q,p>,L)}{2} \right)\end{array} \right\}\]  
Take the log \(L=[<\)_a,b,c,d,x>\({}^{10}\),<a,b,x,c,d>\({}^{10}\),<a,x,b,c,d>\({}^{10}\)_, \(<\)a,x,b,c,d>\({}^{10}\)_] as an example, and use Table 1 to calculate activity \(x\).