# A Grid-Based Swarm Intelligence Algorithm for Privacy-Preserving Data Mining
## 4 Proposed MOPSO-Based Framework for Data Sanitization
### Data Processing  
Before the sanitization process, the user has to set the confidential information to hidden, and such itemsets are placed in the _CI_ set. The frequent itemsets and the pre-large itemsets are then discovered against the minimum and pre-large support counts, and placed into the _FIs_ and _PFs_ sets, respectively. Because the evolution process requires a certain number of computations, the pre-large itemsets are considered as a _buffer_ to reduce the computational cost in terms of the artificial cost of the side effects in the evolution process. The lower support (_lowsup_) of the pre-large concept is derived as follows:  
\[lowsup=\lfloor\frac{\textit{minsup}\times(|D|-m)}{|D|}\rfloor\times 100\%, \tag{11}\]  
where _minsup_ is the minimum support threshold, \(|D|\) is the number of transactions in the database, and \(m\) is the size of a particle in the designed MOPSO-based framework, which is defined through Equation (5).  
Thanks to the discovered large and pre-large itemsets, multiple database scans can be greatly reduced during the evolutionary process. To obtain better transactions for deletion in PPDM, the database is first processed to project the transactions with any of the confidential information appearing in the set of _CI_. The projected database is then set as \(D^{*}\). Each transaction in \(D^{*}\) consists of at least one itemset within the set of _CI_, which is also considered a candidate of the particles for later deletion during the evolutionary process. A detailed algorithm is given in Algorithm 1.  
```
Input:\(D\), the original database; _CI_, the set of confidential information; _minsup_, the minimum support threshold; _lowsup_, the lower support threshold. Output:\(D^{*}\), the projected database; _FI_, the set of frequent itemsets; _PF_, the set of prelarge itemsets
1 find _FI_ and _PF_ by _minsup_ and _lowsup_;
2 for\(q:=\) 1, \(n\); \(i:=\) 1, \(k\)do
3 if\(c_{i}\subseteq T_{q}\)then
4\(D^{*}=D^{*}\cup T_{q}\);
5 calculate the size of particle by Equations (4) and (5);
6 return \(D^{*}\), _FI_, _PF_;
```  
**Algorithm 1**Data Processing  
In the data processing, the inputs of \(D\) and _CI_ are the original database and the set of confidential itemsets, respectively, and the outputs \(D^{*}\), _FI_, and _PF_ are the projected database, the set of large itemsets, and the set of pre-large itemsets. First, the original database is scanned to obtain the _FI_ and _PF_ using _minsup_ and _lowsup_ (line 1), respectively. The algorithm used for mining the _FI_ and _PF_ can be the variants of the pre-large algorithm [45; 46]. The transactions containing any of the confidential itemsets are then projected (lines 2-4). The size of each particle is then calculated (line 5) for the later evolutionary process. Thanks to the advantages of the pre-large itemsets, the side effects of the artificial cost can be easily maintained and updated because the potential itemsets that may become largeitemsets are kept in _PF_. Finally, the projected database (\(D^{*}\)), the frequent itemsets (_FI_), and pre-large itemsets (_PF_) are then returned as the outputs (line 6) for the next evolution process.