## 5 Experimental Design
### Fractional Factorial Design  
Each dataset may contain hundreds to thousands of eligible convolutional neural network models. The previous analysis identified four parameters that significantly affect imbalanced data: LR, DR 1, DR 2, and KS. LR, DR 1, and DR 2 each have five levels, whereas \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline
**Class** & **0** & **1** & **2** & **3** & **4** & **5** & **6** & **7** & **8** & **9** \\ \hline
25:1 & 5000 & 200 & 500 & 1500 & 350 & 800 & 200 & 400 & 1000 & 3000 \\
15:1 & 5000 & 330 & 500 & 1500 & 450 & 850 & 350 & 400 & 1000 & 3000 \\
1:1 & 5000 & 5000 & 5000 & 5000 & 5000 & 5000 & 5000 & 5000 & 5000 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The number of samples extracted from each class in both the CIFAR-10 dataset and the Fashion-MNIST dataset is identical. Figure 5: Images from the Fashion-MNIST dataset. The dataset consists of images divided into 10 unique classes. These images are grayscale with a resolution of 28 \(\times\) 28. KS has two levels, labeled as \(A1\)-\(A4\), \(B1\)-\(B4\), C1-\(C4\), and \(D1\)-\(D2\), respectively. Table 3 lists each factor and its levels. We conducted a systematic experiment using ANOVA on these factors and their levels to explore each factor's effects on and interactions with the evaluation metrics. In this paper, we adopt a method based on Lagrange multipliers to calculate the number of convolution kernels in five convolutional layers [38]. First, we define the number of kernels in each layer as \(n_{i}\), where \(i\) denotes the index of the convolution layer. According to the structure of the convolutional neural network, we can compute the total number of learned parameters using the following formula:  
\[P_{\text{all}}=k\times k\times n_{0}\times n_{1}+\sum_{i=2}^{N}(k\times k \times n_{i-1}\times n_{i})=k^{2}\times\sum_{i=1}^{N}(n_{i-1}\times n_{i}) \tag{18}\]  
where \(P_{\text{all}}\) represents the total number of learned parameters, \(k\) is the kernel size, \(N\) is the total number of convolution layers, and \(n_{0}\) is the number of input channels. Next, we construct the optimization problem using the Lagrange function:  
\[L(n,\lambda_{0},\ldots,\lambda_{i},\ldots,\lambda_{N})=\sum_{i=1}^{N}\log(n_{ i})+\lambda_{0}\Bigg{(}\sum_{i=1}^{N}n_{i-1}\times n_{i}-C\Bigg{)}+\sum_{i=1}^{N} \lambda_{i}(n_{i-1}-n_{i}) \tag{19}\]  
where \(C\) represents the total number of parameters in the network. By calculating the partial derivatives of the Lagrange function, we can determine the optimal configuration of convolution kernels. In this process, we focus on the relationship between the model's discriminative performance and parameter distribution, ensuring that the selected parameter configuration effectively enhances the ability to recognize minority class samples. This way, we can not only obtain the number of kernels for each layer but also optimize model performance to better address the challenges posed by imbalanced datasets. We calculated the number of convolutional kernels for the five layers to be 103, 105, 107, 109, and 179. Subsequently, we fixed the number of kernels and employ a fractional factorial design to explore the relationship between the parameters and the evaluation metrics for the minority class samples. The framework structure of the CNN model used in this study is shown in Table 4, and we adjusted the internal parameters as needed based on different requirements. We conducted fractional factorial design experiments and training on three imbalanced datasets extracted from CIFAR-10 and Fashion-MNIST using the same convolutional neural network layers and batch sizes. Each dataset underwent four repeated experiments to minimize randomness, with a total of 250 data groups per experiment. Based on the ANOVA results, we evaluated the effects of different factors and their interactions with various performance metrics, such as accuracy, recall, F1 score, G-mean, and P-mean, focusing on minority class samples.