# A Grid-Based Swarm Intelligence Algorithm for Privacy-Preserving Data Mining
## 5 An Illustrated Example  
In this section, we illustrate a simple example to explain the designed algorithm step-by-step. In this example, the original database was shown in Table 1, and the upper support threshold (minimum support threshold) is initially set as 35%. The discovered frequent itemsets are then shown in Table 2. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**TID** & **Items** & **TID** & **Items** \\ \hline \(T_{1}\) & \(A,B,E\) & \(T_{6}\) & \(B,C,E\) \\ \(T_{2}\) & \(B,C,E\) & \(T_{7}\) & \(B,C,D,E\) \\ \(T_{3}\) & \(A,B,C,E\) & \(T_{8}\) & \(A,B,E\) \\ \(T_{4}\) & \(A,C,D\) & \(T_{9}\) & \(A,B\) \\ \(T_{5}\) & \(B,C,E\) & \(T_{10}\) & \(C,E\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The discovered frequent itemsets. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**1-Itemset** & **Count** & **2-Itemset** & **Count** & **3-Itemset** & **Count** \\ \hline \((A)\) & 5 & \((AB)\) & 4 & \((BCE)\) & 5 \\ \((B)\) & 8 & \((BC)\) & 5 & & \\ \((C)\) & 7 & \((BE)\) & 7 & & \\ \((E)\) & 8 & \((CE)\) & 6 & & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The discovered frequent itemsets. Assume that itemsets (\(AB\)) and (\(BC\)) from Table 2 are the sensitive itemsets. At the beginning, it would be better to calculate the at least number of transactions to be deleted to completely hide sensitive itemsets. According to Equation (4) and Equation (5), we then have an \(m\) value as 4, and the _lowsup_ is calculated by Equation (11) as 24%. Based on the _lowsup_, we can find the support count of pre-large itemset as 10 \(\times\) 24% (= 3). The pre-large itemsets are used to reduce the computational cost of multiple database scans. In this example, the pre-large itemsets are {(\(AE\)):3, (\(ABE\)):3}. Afterwards, the transactions containing any of confidential information is then projected, which will be used as the transactions to be deleted in the evolutionary progress. In this example, the projected database is shown in Table 3.  
Thus, only the transactions {\(T_{2}\), \(T_{3}\), \(T_{5}\), \(T_{6}\), \(T_{7}\), \(T_{10}\)} can be considered as the transactions for deletion in the sanitization process. Due to \(m\) equaling 4, the size of a particle is 4. Assume the size of a particle is set to 4 and the initial populations for the evolutionary process are randomly chosen from Table 3. After that, the particles of the populations are then evaluated one-by-one based on the defined multi-objective functions shown in Equation (10). Take the particle \(P_{1}\), for example, to illustrate the evaluation process. Suppose the \(P_{1}\) selects the transactions {\(T_{2}\), \(T_{3}\), \(T_{5}\), \(T_{6}\)} for transaction deletion to hide the sensitive itemsets for sanitization. Thus, the supports of (\(BC\)) and (\(CE\)) respectively become (1/6 = 16.7% \(<\) 35%), and (2/6 = 33.3% \(<\) 35%); the (\(BC\)) and (\(CE\)) are then completely hidden after the sanitization process. Moreover, the \(f_{1}\) (_hiding failure_) of the particle is calculated as 0. The discovered frequent itemsets in Table 2 are then updated. In this example, the non-sensitive itemset of (\(BCE\)) becomes (1/6 = 16.7% \(<\) 35%), which will be hidden after the sanitization progress. The _missing cost_ of \(f_{2}\) is returned as 1. Since the artificial itemsets can be generated from the pre-large itemsets, in this example, none of the itemsets are generated as the _artificial cost_. The _artificial cost_ of \(f_{3}\) is returned as 0. The Dis is calculated as 4 because four transactions are deleted from the database for sanitization. All the particles are then evaluated in the same way, and the results after evaluation are shown in Table 4.  
After that, we then find the non-dominated particles of population. It is clear that the \(P_{1}\), \(P_{4}\) and \(P_{5}\) are the non-dominated particles in this running example based on the non-dominated property. Based on the grid method, we then can assign the probability of each particle for the updating of _gbest_ (global best).