# Hyperspectral Image Classification with Imbalanced Data Based on Semi-Supervised Learning
## 1 Introduction
The most common approaches are random undersampling (RUS) and NearMiss [23]. NearMiss selects the majority of samples with the smallest average distance from the minority classes to balance the training data [23]. The main limitation of these methods is the loss of information from the majority classes [24]. Thus, it is difficult to add new natural features to build classifiers by using existing preprocessing techniques. In general, abundance features are required to improve generalization in classification. Minority classes in an imbalanced dataset lack sufficient features for classification owing to sparse samples. This lack of features results in the failure of specific classifications in remote sensing. For such an imbalanced problem, semi-supervised learning is a creative solution that utilizes the rich natural features in the unlabeled data. In the remote sensing classification, large amounts of unlabeled image data can be obtained through remote sensors at a low cost [10]. However, acquiring a large amount of labeled data is challenging because of the expensive and time-consuming manual labeling process [5]. Particularly in hyperspectral image classification, the categories are often matched to the species level, which increases the difficulty of collecting ground-truth labels. Massive datasets with few labeled samples are commonly used [5]. Therefore, semi-supervised learning, which leverages the rich natural features of unlabeled images to improve the performance of classifiers, has attracted significant attention [25; 26]. Commonly used semi-supervised learning methods have made progress on hyperspectral image classification, including the self-learning [27; 28], graph-based [29; 30], and active learning [31; 32; 33] methods. Recently, several studies have focused on the application of generative adversarial networks [34; 35; 36; 37; 38] and graph convolutional networks [39; 40; 41] for semi-supervised hyperspectral image classification. In natural images classification, several semi-supervised learning methods aim to find the most representative class-specific samples from both labeled and unlabeled samples. For example, pseudo-label selects the maximum predicted probability class as the true label for unlabeled samples [42]. The \(\Pi\)-model combines the labeled and unlabeled data by applying consistency regularization [43]. These methods improve the classification performance and prediction ability of the scene classification data. Furthermore, abundant natural information can be extracted from unlabeled samples. However, these semi-supervised methods assume that the labels cover all classes and that each class is relatively balanced. Indeed, only a few studies have attempted to address the imbalanced data problem by using semi-supervised learning [44; 45; 46]. The key challenge is the effective utilization of the natural features of unlabeled data to improve the classification performance of hyperspectral image classifiers when dealing with imbalanced data. Furthermore, understanding the extraction of effective labels from a minority class is crucial to improving the performance of the classifier. To address this problem, we propose a novel semi-supervised learning-based solution called NearPseudo. In NearPseudo, an initialization classifier is built based on training data with label, and then creates the corresponding pseudo-labels for unlabeled data. In order to reduce the misclassification cost and improve the quality of the pseudo-labels, the optimal unlabeled samples are selected according to the nearest distance to minority sample and added to unbalanced datasets with the corresponding pseudo-labels. Thus, the unlabeled data can be used for model training, which ensures the automatic extraction of natural features by the classifiers. Simultaneously, we created a feedback mechanism based on a consistency check, which requires that the adding of pseudo-labels to unlabeled data should be consistent with the minority class. It further improves the quality of the pseudo-label.