# SSKM_DP: Differential Privacy Data Publishing Method via SFLA-Kohonen Network
## 4 The Proposed Data Publishing Method
### SFLA-Kohonen Data Clustering Algorithm
N frogs are ranked in descending order of \(fit\) (\(X_{i}\)) to obtain frog \(X_{w}\) with the worst fitness value and frog \(X_{b}\) with the best fitness value. Frogs with the worst fitness value of a cycle are ranked according to position update (10) and (11):  
\[D=rand()\times(X_{b}-X_{w}) \tag{10}\]  
\[X^{\prime}{}_{w}=X_{w}+D \tag{11}\]  
where \(rand()\) represents a random number in the range (0, 1) and \(D\) represents the leapfrog steped size. Step 4. The fitness value is calculated after the frog position is updated. If the updated frog is better than the current frog \(X_{w}\), \(X^{\prime}{}_{w}\) replace \(X_{w}\) and retain the updated frog's parameters. If the updated frog is not better than the current frog, keep the current frog's parameters. Step 5. When the maximum number of iterations or the required convergence condition are reached, the algorithm is terminated and the optimal frog \(X_{g}\) of the population is output. The parameter of the optimal frog is taken as the initial weight of the SOM network. There is no need to set the number of clustering clusters when the SFLA-Kohonen network is used for clustering, and the clustering results have better accuracy and rationality. Secondly, the adjacent relation is imposed on the center of mass of the cluster, resulting in higher homogeneity within the cluster. At the same time, the SFLA-Kohonen network has good self-stability and strong anti-noise ability, which makes the cluster sensitivity formed by clustering low to reduce the noise required by differential privacy and improve the availability of data. The Algorithm 3 for the data clustering process using the SFLA-Kohonen network is as follows:  
```
0: dataset \(U=\{x_{1},x_{2},\ldots x_{n}\}\); the learning rate is and its value range is (0,1); Maximum learning times \(T\)
0: Clusters formed by clustering \(V=\{v_{1},v_{2},\ldots v_{m}\}\). 1:\(W_{ij}\gets X_{g}\)
2:for\(\eta<\eta_{max}\) or \(t<T\)do
3: calculate \(d_{j}=\sqrt{\sum\limits_{i=1}^{n}\left[x^{i}(t)-W_{ij}(t)\right]^{2}}\)
4: Obtain new winning neurons, update \(W_{ij}\)
5:\(W_{ij}(t+1)=W_{ij}+\eta(t)*N_{j,c(x)}\left[x_{i}(t)-W_{ij}(t)\right]\)
6:\(\eta(t)=\eta(0)e^{-t/T}\)
7:endfor
8:return FModel
```  
**Algorithm 3** SFLA--Kohonen networks to achieve data clustering  
Input: Dataset \(U=\{x_{1},x_{2},\ldots x_{n}\}\); the learning rate is \(\eta\), and its value range is (0,1); maximum learning times \(T\)  
Output: Clusters formed by clustering \(V=\{v_{1},v_{2},\ldots v_{m}\}\). Step 1. The value of optimal frog \(X_{g}\) obtained in Algorithm 1 is set as the initial connection weight \(W_{ij}\) of each neuron in the input layer \(I\) and the competition layer of the Kohonen network. In this paper, the Gaussian function was adopted as the domain function, and its definition is shown in (12):  
\[N_{x}=\left\{ \begin{array}{c}\exp(-\frac{\|d_{i}-d_{j}\|^{2}}{2\beta^{2}})\ d_{i}-d_{j}\leq\delta\\ 0\ d_{i}-d_{j}>\delta\end{array} \right\} \tag{12}\]  
Step 2. The Euclidean distance \(d_{j}\) is calculated from all input neurons \(x_{i}\) and neurons in the competition layer at time \(t\), as shown in (13):  
\[d_{j}=\sqrt{\sum\limits_{i=1}^{n}\left[x_{i}(t)-W_{ij}(t)\right]^{2}} \tag{13}\]  
The neuron with the smallest Euclidean distance is obtained to determine the winning neuron. Step 3. The winning neighborhood of the winning neuron is obtained according to the domain function. The weight of all neurons is adjusted in the winning neighborhood according to Equation (14):  
\[W_{ij}(t+1)=W_{ij}+\eta(t)*N_{j,c(x)}*\left[x_{i}(t)-W_{ij}(t)\right] \tag{14}\]  
where \(\eta(t)\) represents the learning rate at time \(t\), which decreases with the increase of \(t\). The \(\eta\) (\(t\)) function used in this paper is shown in Equation (15):  
\[\eta(t)=\eta(0)e^{-t/T} \tag{15}\]  
Step 4. The learning rate \(\eta\) is updated and whether \(\eta\) reaches the preset condition or whether the learning times \(t\) reaches the maximum learning time \(T\) is determined.