# Hyperspectral Image Classification with Imbalanced Data Based on Semi-Supervised Learning
## 1 Introduction  
Hyperspectral images provides hundreds of continuous narrow spectral bands, which facilitate the discrimination of different surface features [1; 2; 3; 4]. The rich spectral informationobtained from hyperspectral remote sensing images has been widely employed in numerous applications, such as environmental monitoring, agriculture, and mineralogy [1, 2]. Hyperspectral image classification is essential in applications that focus on assigning class labels to each pixel [2]. The number of selected training samples in each class may be significantly different in some cases. Such a dataset is called an imbalanced dataset [2, 5, 6]. Conventionally, the rarest classes are named minority classes, and the remaining ones are called majority classes. In remote sensing classification, dataset imbalance is commonly observed during field sampling owing to the uneven distribution of objects with various sizes seen in nature [2, 5, 7]. Handling an imbalanced dataset frequently encounters degradation of the prediction accuracy or poor accuracy for the minority class, which are called imbalanced problems [5, 6]. The lack of capacity of most machine-learning classifiers to handle imbalanced datasets further contributes to these problems. With the rapid development of computer technology, machine-learning classifiers, such as logistic regression (LR) [8] and random forest (RF) [9], have been widely utilized in hyperspectral image classification, and they have exhibited satisfactory classification performance and excellent generalization [10, 11]. However, most classifiers are designed under the assumption that the sample sizes of each class are approximately equal. When using imbalanced data, prejudicial and biased classification results may be obtained [5]. Consequently, the minority classes may be distorted or treated as noise. Even if the prediction model achieves a relatively high overall accuracy, the minority classes may remain unknown [12, 13, 14]. Additionally, some common classifiers in hyperspectral images that use small spectral signatures are also insensitive to the imbalanced data problem [15, 16]. Thus, the classification of imbalanced data remains a significant challenge [17]. Several studies have highlighted the imbalanced data problem and its research value [2, 5, 7]. Most approaches that mitigate imbalanced data problems can be categorized as: preprocessing techniques [18] or modified classifiers [19]. Preprocessing techniques usually alter an imbalanced dataset into balanced distributions before training classifiers, whereas modified classifiers are often associated with a specific algorithm. Preprocessing techniques can be applied to most algorithms and are more flexible. Among the preprocessing techniques, the resampling methods are widely used to compensate for problems arising due to imbalanced data [5]. Resampling methods balance the dataset by adding samples of the minority classes or deleting samples of majority classes [2, 3]. Studies have shown that the classification performance on a balanced distribution is better than that of an imbalanced distribution [20]. Resampling methods are typically categorized as: oversampling, undersampling, and hybrid methods [5]. The most popular approach, oversampling, generates new minority class samples to balance the dataset [21]. This involves the random duplication of minority samples, termed as the synthetic minority oversampling technique (SMOTE) [22]. For each minority sample \(x_{1}\), SMOTE calculates the distances from \(x_{1}\) to each sample and selects the \(k\)-nearest neighbor set \(K=\{x_{1},x_{2},\ldots,x_{k}\}\). Subsequently, artificial samples \(\hat{x}_{a}\) are generated by \(\hat{x}_{a}=x_{1}+(\sum_{j=1}^{k}x_{j}-x_{1})\times\delta\), where \(\delta\in[0,1]\) is a random number. Artificial samples are clearly generated by a linear combination of existing training samples, which may not add new features to the training process. Conversely, the undersampling method randomly eliminates the majority of samples to balance the data.