## 2 Methodology
### FC-SMOTE Algorithm Handing
In the safe area, the Euclidean matrix of the membership degree of the minority samples and the membership degree of the cluster center is calculated according to Formulas (3)-(5). \[\mathbf{D}_{uv}=|\mathbf{U}-\mathbf{V}| \tag{3}\]  
\[\mathbf{U}= \begin{bmatrix}u_{11}&u_{12}&\cdots&u_{1j}\\ u_{21}&u_{22}&\cdots&u_{2j}\\ \vdots&\vdots&\ddots&\vdots\\ u_{n1}&u_{n2}&\cdots&u_{nj}.\end{bmatrix}  \tag{4}\]  
\[\mathbf{V}= \begin{bmatrix}v_{11}&v_{12}&\cdots&v_{1j}.\end{bmatrix}  \tag{5}\]  
In Formula (3), \(n\) is the number of minority samples. The distance matrix \(\mathbf{D}_{uv}\) means that each row of \(\mathbf{U}\) is subtracted by each row of \(\mathbf{V}\), and its Euclidean distance is calculated. The Euclidean distance matrix of each selected cluster is calculated based on the above  
Figure 2: (**a**) SMOTE may generate noise sample (k = 2). (**b**) fuzzy clustering synthetic minority oversampling technique algorithm (FC-SMOTE) synthesizes new minority samples in safe areas. formulas, and the majority of samples are ignored. The mean minority distance within each safe area is obtained by dividing all non-diagonal elements of the distance matrix by the number of non-diagonal elements. The density of each safe area is defined as the distance matrix of the safe area divided by the mean minority distance raised to the membership matrix's dimension root. Sampling weight is defined as the inversion of the density. The sampling weight\((SW)\) can be calculated according to Formulas (6) and (7). \[density=\frac{\mathbf{D}_{uv}}{mean\text{ }minority\text{ }distance^{ \frac{1}{k}}} \tag{6}\]  
\[SW^{u}=\frac{1}{density}\qquad(u=1,2,...,S_{min}). \tag{7}\]  
For the initial class-imbalanced dataset, \(c\) is the membership matrix dimension and \(S_{maj}\) and \(S_{min}\) are used to represent the sample number of the majority class and the minority class, respectively, and their difference equals the total number of new minority samples that need to be synthesized. Therefore, the sample number of the synthetic minority classes around each minority sample can be calculated using Formula (8). \[N_{min}^{u}=round((S_{maj}-S_{min})\times SW^{u})\qquad(u=1,2,...,S_{min}) \tag{8}\]  
\[ \begin{cases}W_{1}=(S_{maj}-S_{min})-\sum_{u=1}^{S_{min}}N_{min}^{u}\quad \text{if}\quad(S_{maj}-S_{min})>\sum_{u=1}^{S_{min}}N_{min}^{u}\\ W_{2}=\sum_{u=1}^{S_{min}}N_{min}^{u}-(S_{maj}-S_{min})\quad\text{if}\quad(S_{ maj}-S_{min})<\sum_{u=1}^{S_{min}}N_{min}^{u}\end{cases}  \tag{9}\]  
\[ \begin{cases}N_{min}^{u}=N_{min}^{u}+P_{w}W_{1}\quad\text{if}\quad(S_{maj}-S_{ min})>\sum_{u=1}^{S_{min}}N_{min}^{u}\\ N_{min}^{u}=N_{min}^{u}-P_{w}W_{2}\quad\text{if}\quad(S_{maj}-S_{min})<\sum_{u=1 }^{S_{min}}N_{min}^{u}.\end{cases}  \tag{10}\]  
In Formula (8), the function round(\(\cdot\)) represents rounding a number down or up according to the decimals. Thus, \(N_{min}^{u}\) represents the number of new minority samples that need to be generated by SMOTE around the ut minority sample. The distribution of samples generated in oversampling depends on the sampling weight--that is, high and low sampling weights correspond to minority samples of low density and high density, respectively. In Formula (10), \(P_{w}\in[20\%,18\%,16\%,14\%,12\%,8\%,6\%,4\%,2\%](w=1,2,...,9)\). When \((S_{maj}-S_{min})>\sum_{u=1}^{S_{min}}N_{min}^{u}\), each sample of the first nine initial minority samples with a higher \(SW\) corresponds to the weight in \(P_{w}\) in turn, and increases \(P_{w}W_{1}\) synthetic samples around it. When \((S_{maj}-S_{min})<\sum_{u=1}^{S_{min}}N_{min}^{u}\), each sample of the last nine initial minority samples with a lower \(SW\) correspond to the weight in \(P^{u}\) in turn and decrease \(P_{w}W_{2}\) synthetic samples around them. If \(P_{w}W_{2}\) is bigger than the number of synthetic samples around the minority sample, we skip this minority sample without deleting the generated sample and assign the weight to the next minority sample. The steps of FC-SMOTE are shown in Algorithm 1, and the flowchart is as follows in Figure 3.