## 4 Experimental Results
### Experimental and Optimal Parameter Settings  
For the sake of validating the effectiveness and generalization of the HDCDF network, three widely available datasets are used and the experiments are performed using a computer with an NVIDIA GeForce GTX 1660 graphics card (manufactured by NVIDIA Corporation, Santa Clara, CA, USA) Super 6 GB, an Intel Core i7-8700K CPU (Intel, Santa Clara, CA, USA), and a memory of 16 GB. The software framework was PyTorch 1.12.0, CUDA 11.3, and the programming language was Python 3.9.18. For image cube display, we adopted the ENVI 5.6 software to process datasets. We used Adam Optimizer to optimize the network parameters with a batch size of 32. The number of epochs in the experiment was set to 50 and the learning rate was 0.001. In addition, we also adopted the early stopping strategy and set patience to 10, which means that if the validation loss is not improved after 10 consecutive epochs, early stopping will be triggered. For experimental evaluation, three widely used quantitative metrics are utilized to assess the HDCDF performance, as well as a confusion matrix (\(C_{n\times n}\)), a specific table layout used to visualize the performance of supervised learning algorithms. In the confusion matrix, the prediction labels and the actual labels are represented, respectively, by each column and row. \[C= \begin{bmatrix}C_{11}&\cdots&C_{1n}\\ \vdots&\ddots&\vdots\\ C_{n1}&\cdots&C_{nn}\end{bmatrix}  \tag{16}\]  
1. Overall accuracy (OA) is the proportion of correctly classified samples. \[p_{o}=\frac{\sum_{i=1}^{n}c_{ii}}{\sum_{i}^{n}\sum_{i}^{n}c_{ij}}\] (17)
2. Average accuracy (AA) is the average of all class accuracies. \[p_{a}=\frac{1}{n}\times\sum_{i=1}^{n}\frac{C_{ii}}{C_{ij}}\] (18)
3. The Kappa coefficient (Kappa) is a robust measure of the degree of agreement between the ground-truth map and classification map. \[p_{e}=\sum_{i=1}^{n}\left(\sum_{i}^{n}C_{ij}\times\sum_{j}^{n}C_{ij}\right)\] (19) \[k=\frac{p_{o}-p_{e}}{1-p_{e}}\] (20) where \(p_{o}\) represents OA, \(p_{a}\) refers to AA, and \(p_{e}\) computes the measures of agreement between the true and predicted classes. \(p_{o}-p_{e}\) describes the difference among OA values obtained by chance and actual accuracy; \(1-p_{e}\) portrays the maximum value for the difference. Usually, the Kappa falls between 0 and 1; the closer Kappa is to 1, the better and more stable the model classification effect is. It is vital to find the optimal parameters to run the model. During dataset generation, the HSI cube is divided into overlapping small 3D patches of size \(Z\in R^{P\times P\times B}\), where \(P\times P\) refers to the spatial input size and \(B\) represents the number of spectral bands after PCA processing. This kind of processing method, instead of processing the entire HSI cube, can reduce the number of parameters and, at the same time, significantly reduces the required number of parameters. To obtain the best-fitting spatial size and amount of spectral bands, we conducted several experiments with different sizes and numbers ofbands to select the most suitable value. As a result, we concluded that the OAs begin to decline when the spatial size exceeds 21 \(\times\) 21 and the value of \(B\) is over 30. Figure 14 shows the HDCDF classification performance with different spatial sizes and amounts of spectral bands. To assess the performance of our proposed structure, we also select some DL-related classification methods with better effects than comparative methods, including 3 DCNN, the double-branch multi-attention mechanism network (DBMA) [24], SpectralFormer [29], the extended Vision Transformer (ExViT) [30], and the lightweight spectral-spatial neural architecture with a multi-attention feature extraction network (LSSMA) [43]. Specifically, SpectralFormer and ExViT are novel networks developed based on the transformer.