# Computational Intelligence for Observation and Monitoring: A Case Study of Imbalanced Hyperspectral Image Data Classification

Authors: Debaleena Datta; Pradeep Kumar Mallick; Jana Shafi; Jaeyoung Choi; Muhammad Fazal Ijaz
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

Imbalance in hyperspectral images creates a crisis in its analysis and classification operation. Resampling techniques are utilized to minimize the data imbalance. Although only a limited number of resampling methods were explored in the previous research, a small quantity of work has been done. In this study, we propose a novel illustrative study of the performance of the existing resampling techniques, viz. oversampling, undersampling, and hybrid sampling, for removing the imbalance from the minor samples of the hyperspectral dataset. The balanced dataset is classified in the next step, using the tree-based ensemble classifiers by including the spectral and spatial features. Finally, the comparative study is performed based on the statistical analysis of the outcome obtained from those classifiers that are discussed in the results section. In addition, we applied a new ensemble hybrid classifier named random rotation forest to our dataset. Three benchmark hyperspectral datasets: Indian Pines, Salinas Valley, and Pavia University, are applied for performing the experiments. We have taken precision, recall,F score, Cohen kappa, and overall accuracy as assessment metrics to evaluate our model. The obtained result shows that SMOTE, Tomek Links, and their combinations stand out to be the more optimized resampling strategies. Moreover, the ensemble classifiers such as rotation forest and random rotation ensemble provide more accuracy than others of their kind.


---

## Body

## 1. Introduction

In recent times, images have been one of the prime data sources. Hyperspectral images (HSIs) are currently in trend due to the enormous amount of information it captures in an earth surface scene. HS data are one type of data that can be used in various ways to develop human technology [1]. HSI refers to spectral imaging data acquired by satellites equipped with airborne spectrometers. The photographs take over specific earth surfaces, referred to as the scene, containing various land cover classes such as flora, concrete, and water bodies. Because each related land cover occupies a varied surface area, the number of pixels representing each class varies. However, HS data have various difficulties, including noise, quality and quantity of labeled data, dimensionality, and categorical sample imbalance [2]. Additionally, analyzing and interpreting HS data necessitate several processes, including denoising, lowering hyper-dimensionality, spectral unmixing, and, most critically, identifying land cover [3]. The classification of the imaging scene has been a preoccupation of professionals from the inception of hyperspectral data. Initially, they used statistics-based classifiers in conjunction with some preprocessing techniques. The categorization problem became easier to handle with breakthroughs in ML and the introduction of DL. It provides an excellent strategy to deal with the dataset’s embedded concerns [4].Imbalanced data refer to classification challenges in which the classes are not equally represented; the major class is the most common, while the minor class is the rarest [5]. Information security, medical imagery, bioinformatics, network intrusion, and fraud detection are just a few examples of real-world datasets that suffer from imbalanced classification [6]. The HSI dataset is also skewed since insufficient data instances belong to either of the class labels due to their different land area coverage. The sample distribution per class can range from a little imbalance to a severe imbalance, with few samples in the minor class and hundreds in the major class. Two basic criteria can also be used to demonstrate the HSI imbalance: (1) the minor class shortage of knowledge and (2) the imbalance ratio (ImbR), i.e., the ratio between the minor and major classes [7]. The mathematical formula is given as follows:(1)ImbR=Number of class samples belonging to minor classNumber of class samples belonging to major class.Due to its complicated data structure, HSI eventually confronts an imbalanced classification challenge. Unbalanced classifications complicate predictive modeling because most machine learning algorithms for classification were created with an equal number of samples per class in mind. As a result, models with lower prediction accuracy arise, particularly for the minor class, posing a problem because the minor class is frequently more significant than the major class. As a result, categorization errors are more probable to occur in the minor class than in the major class [8]. Because of the dataset's inherent complexity, learning from it demands new views, approaches, concepts, and methods for changing data. The most effective way to address the data imbalance is to resample the data instances to roughly equal proportions. The three types of sampling procedures employed are oversampling, undersampling, and hybrid sampling. Oversampling entails taking identical random data samples from the minor class, leading to overfitting. In contrast, undersampling entails removing random knowledge from the major class, resulting in information loss. There are also hybrid balancing strategies that use a collaborative effort between an oversampler and an undersampler to balance samples from each class in the same dataset [9]. The hybrid sampling method combines an oversampler and an undersampler that balances the dataset. After correcting the imbalance, a suitable model must be used to train the dataset. Logistic regression (LR), naive Bayes (NB), support vector machine (SVM), and tree-based classifiers are examples of benchmark machine learning algorithms suitable for moderately balanced datasets [10]. Ensemble learning methods have become increasingly prominent in the latest years. The primary objective of those systems is to increase performance by aggregating the findings of multiple weak classifiers. These systems employ a voting technique amongst all the weak classifiers to obtain the ultimate classification result [11]. A decision tree (DT) [12] is considered to be the most preliminary bagging technique. DT for each subset of the original dataset has been created individually. Finally, a voting mechanism was used to determine the final result among those DTs. Random forest (RF) [13] is the most widely utilized tree-based ensemble classifier based on the bagging approach for both classification and regression. The insensitivity of RF to spectral bands and its ability to handle missing and imbalanced data are two of its most enticing characteristics. It can also be used on noisy samples because it does not overfit the data easily [14]. The extra trees (ET) or extremely randomized trees [15] approach works by producing many unpruned decision trees from the training dataset. In contrast to classification, predictions are created for regression by taking averages of the prediction formed by the subordinate DTs, whereas for classification, the rule of majority voting is applied. Unlike RF and bagging, which build each DT using a bootstrap sample of the training dataset, ET fits each DT to the whole training dataset. Rotation forest (RoF) [16] algorithms outperform bagging on noise-free and imbalanced data. Compared with bagging and RF, RoF can achieve similar or more excellent results with fewer trees. Blaser and Fryzlewicz [17] proposed an ensemble of random and rotation forests in the name of random rotation ensemble forest (RREF). The random rotation efficiently creates a new coordinate system belonging to each base learner, increasing ensemble variety without sacrificing accuracy. Moreover, one significant distinction between the random rotation and the random projection is that rotations are reversible, meaning no information loss.The premise that motivated us to pursue our research work is a broad analytical study of the prevailing resampling techniques and their impacts on the hyperspectral images, viz. oversampling, undersampling, and hybrid sampling. For oversampling, four useful techniques are selected, namely random oversampling (ROS) [18], synthetic minority oversampling technique (SMOTE) [19], borderline SMOTE (B-SMOTE) [20], and adaptive synthetic minority oversampling technique (ADASYN) [21]. Furthermore, four popular undersampling methods are studied, namely random undersampling (RUS) [22], Tomek Links (TLs) [23], neighborhood cleaning rule (NCL) [24], and edited nearest neighbor (ENN) [25]. Finally, two-hybrid sampling techniques are considered: SMOTETomek [26], a combination of SMOTE and TL, and SMOTEENN [27], a combination of SMOTE and ENN. These strategies are used to balance the dataset that will be learned through training. These balanced datasets are then passed to the classifiers as train inputs for categorizing the land covers in the HS scenes. In this work, we have used the eminent tree-based ensemble classifiers that are demonstrated for their compatibility with synthetically balanced, huge-dimensioned HSI datasets. The ensemble classifiers employed here are DT, ET, RF, RoF, and RREF. They are utilized to construct the entire comparison study where each of these classifiers is assessed using all the resampling techniques for individual datasets. The quality and performance of the model are evaluated over testing data using various metrics such as precision score, recall score, F score, overall accuracy, and Cohen kappa score.Our work provides the following contributions:(a)
A comprehensive adaptation of conventional resampling algorithms to correct the hyperspectral datasets’ substantial imbalance.(b)
A novel approach to classify hyperspectral images using efficient tree-based ensemble learning methods, i.e., the traditional tree-based techniques and the hybridized and modified forest methods to structure the classification model.(c)
An advanced comparative investigation of various oversampling, undersampling, and hybrid sampling strategies applied to hyperspectral datasets shows that they positively influence rectifying the major-minor sample imbalance.(d)
The innovative, thorough comparison of the applications of the included tree-based ensemble classifiers in categorizing the surface covers is captured in the HSI in terms of different performance assessment metrics. In addition, these classifiers are capable of learning joint spectral-spatial features of the balanced datasets.(e)
The comparative case study with all the resampling techniques used for HSI datasets can be carried forward to the other computational intelligence and monitoring applications with several types of datasets, especially in the area of medical imagery.(f)
The study provides more excellent knowledge for the researchers who deal with big data and voluminous imagery data that suffer due to imbalanced samples. The comparison depicted here benefits choosing the more appropriate strategy to work with different datasets and provides a better view of improvising those strategies.The remaining paper is divided into the following categories: Section2 describes previous work in the area of resampling for various imbalanced datasets, Section 3 depicts our research work’s methodology, Section 4 illustrates the model evaluation and test results, and Section 5 provides the conclusion and also deliberates the research work’s limitations and future scope.


## 2. Previous Works

Unbalanced data have produced numerous problems in the classification of hyperspectral images. Researchers have employed preprocessing techniques to deal with the issue of class imbalance in several application fields. Preprocessing approaches for the imbalanced class problem include data-driven methodologies, such as sampling. Oversampling, undersampling, and hybrid sampling are the three types of sampling. The suitable sampling technique to be chosen is determined by the dataset, the sample size of each class, and their ratio of imbalance (IR). Figure1 depicts the overall changes in the major and minor class samples in a dataset using three different sampling procedures. One class, i.e., the major class, is dominant over another class considered minor in the original dataset. In oversampling, the minor class samples are overpopulated to match the number of major class samples by creating new synthetic instances in the neighborhood of existing samples. On the other hand, undersampling techniques remove the linked and redundant major class samples to bring balance. However, hybrid sampling incorporates both strategies to eliminate the imbalance in the dataset.Figure 1
Representation of the resampling methods for balancing data.Oversampling, also known as upsampling, is a sampling technique that helps to balance a dataset by duplicating minor class examples. This procedure has the advantage of causing little or no data loss. This approach has the problem of causing overfitting and adding to the computational load. The two types of oversampling are ROS and informative oversampling. ROS is a technique for balancing the distribution of minor classes by randomly repeating minor class examples. The informative oversampling technique [28] synthesizes minor class samples depending on a predefined criterion. Several applications of oversampling have been deployed for various types of datasets in recent years. A linear SVM was used in conjunction with a few SMOTE variations to detect malware in [29]. The model synthesizes dangerous occurrences based on the signature from the standpoint of the nominal properties. The malicious traffic dataset is first clustered using a single-linkage hierarchical technique to enrich the malicious class dataset, and then, signatures produced by every harmful traffic cluster are used. The resulting balanced datasets are then applied to train a semantic malware detection model for mobile devices. Random forest was used as the classifier with SMOTE to overcome the massive data imbalance problem. With a constrained hyperparameter set and nondynamic oversampling rate, SMOTE is used to eliminate imbalance after binarizing the original dataset [30]. This work fails for multiclass scenarios. In [31, 32], the same combination was used to detect insurance fraud claims and predict depression in women due to the modern lifestyle. B-SMOTE and SVM with kernel sigmoid were employed for data augmentation on P300 users with poor BCI performance [33]. For the DEAP dataset, the 1D-CNN model was utilized for classifications of two emotional dimensions: valence and arousal. B-SMOTE was employed to acquire a more homogeneous set of features of EEG signals [34]. For classifying HSIs, rotation forest has been combined with dynamic SMOTE [35], where SMOTE is applied to the imbalanced classes before each rotation tree is constructed. The procedure was discovered to take a long time. This work is expanded upon in [36], where the SMOTE technique is employed to create balanced datasets by incorporating spatial information from surrounding pixels of samples. These datasets are loaded into the weighted rotation forest model, which combines the RoF and multilevel cascaded RF. The cascade forest receives the rotation feature vectors generated by the rotation forest. In addition, the output likelihood of every level and the original data forms a stack. Furthermore, the sample weights need to be adjusted on a regular basis using the dynamic weight function generated from the classification scores at each level. According to [37], the adaptive synthetic sampling is another excellent strategy for oversampling when combined with a convolutional neural network to detect intrusion in a wireless network. ADASYN prevents the model from being sensitive to large samples but insensitive to small samples, which can help in small sample recognition and learning. The model considerably improves multiclassification jobs. However, a simpler residual network is still needed to increase small sample identification accuracy and execution performance. Another attempt at intrusion detection is made in [38], where ADASYN is applied to oversample the training dataset to enhance the number of infiltration and heartbleed attack behavior data samples. Classification and regression trees (CARTs) were used to create the DTs for the RF approach with a Gini coefficient. Even though this method delivers more incredible prediction performance, efficacy, and resilience, the parameters of ADASYN were adjusted artificially. All the above works that include oversampling suffer from a replicated voluminous data problem that is sometimes redundant, which leads to a common issue of high storage, calculation, and time complexity.Undersampling, also known as downsampling, is a proper data balancing technique. The classifier obtains training using a major class subset in this method. When we undersample, some samples are deleted from the major class. Random sampling and informative undersampling are the two types of undersampling algorithms. The principle of random undersampling is simple: samples from the major class are randomly removed until the dataset is balanced. The informative undersampling technique selects only the necessary major class instances based on a prespecified selection criterion to balance the dataset [28]. Random undersampling [39] has the most relevance in huge data settings since it aids the random forest in making more accurate classifications in less time. In [40], the same methodologies are used for extensive specialized data for bioinformatics, where feature selection (FS) is used in conjunction with RUS, and the relationship between the two is investigated. The random forest learner is used in the FS component to compute feature importance, and encoding is used to transform categorical features into duplicate variables. RUS has a speedier runtime and a lower computing burden than random oversampling; however, the classification technique requires to be appropriate. Tomek connections have been demonstrated in [41], where TLs are used to eliminate outliers, noisy, and redundant samples from the major class of 10 real-world datasets. The removal of potentially ineffective examples causes the decision boundary to shift towards the minority region, providing a favorable environment for learning on various classifiers, including SVM. To create an application-oriented multiclass real-life application, the model must be supplemented with multiple schemes/techniques to eliminate the majority of instances with minimal data loss and faster processing. For the overpopulated bacterial data, in the preparation phase, the TL algorithm is used to clean data and reduce noise and produce a better result than oversamplers [42]. In addition, Tomek linkages are utilized to correct the imbalance in some medical datasets [43], where balanced data are put into the stacking ensemble after downsampling. It works on two levels. At level 0, there are many different classifiers, such as NB and SVM. The level 0 output is given to the level classifier for the final forecast. Base classifiers such as LR, k-NN, and NB are applied to apply datasets that are not more accurate and specific than contemporary research. The works discussed above used limited datasets and basic classifiers. On the one hand, undersampling might reduce the computational burden, but on the other hand, it may also remove significant information that might produce a better outcome.Hybrid sampling is an appropriate combination of oversampling and undersampling procedures that correctly balance the training data. The oversampling strategy is used to create fresh samples by randomly sampling the current training data with replacement. Because the minor class is oversampled, a new balanced training dataset is created. The undersampling method is then used to reduce unwanted overlap between classes, lowering the number of classes. As a result, until a more assertive threshold for classifier conclusions could be created, the majority of data was eliminated [26]. Despite the small numbers, there is a significant study in this sector. Intrusion detection is carried out in [44] utilizing a mix of synthetic minority sampling and a neighborhood cleaning rule. For the learning process to be unaffected by data distribution, SMOTE generates a small number of datasets. Furthermore, the explored dataset revealed that border and noisy data have an impact on classification performance. As a result, NCL rules remove noisy and boundary data from the oversampled data. C4.5 and SVM are used as classifiers, but the model is not robust. The same hybrid resampling technique is used in conjunction with logistic regression [45]. This model is proven to be the most effective for binary categorized datasets. Another hybrid strategy combines synthetic oversampling with Tomek linkages, which have been used to detect fake credit cards [47] and medical disease datasets [46]. Overall, hybrid techniques are more prone to data loss and consume additional time.Both works are based on a comparison of results from various classifiers. The student sadness data are distributed across universities using a combination of random oversampling, Tomek connections, and random forest. Only binary and less noisy datasets are adequate for this model [48]. A hybrid of SMOTE and ENN is used to process the KDDCup99 dataset and tackle the difficulties of data imbalance and sample overlapping with the classifier RF [49]. The same combination but with classifier XGBoost is carried forward to build a prediction model that efficiently determines the category of a person, whether healthy or possessing Parkinson’s syndrome [50]. RRE pruning is used for HSI classification that prunes the constituent classifiers with poor complementarity, and subsequently, the leftover constituent classifiers with higher complementarity are joined to produce an ensemble classifier. These strategies ensure that the component classifiers used to build the ensemble classifier are precise but diversified, which enhances the ensemble classifier’s performance [51].


## 3. Methodology

Figure2 displays the framework of our suggested approach for improving hyperspectral image categorization by coping with sample imbalance. The following are the steps that are included in structuring our study.Figure 2
Workflow of the proposed model.


### 3.1. Data Preprocessing

#### 3.1.1. Dataset

For our experiment, we collected three mostly explored hyperspectral datasets that are available in the public domain [52] and stored in the memory of our system. A brief elaboration of the datasets is as follows, along with Figure 3.(a)
AVIRIS Indian Pines (IP): this dataset was captured by Airborne Visible/Infrared Imaging Spectrometer (AVIRIS) sensor on June 12, 1992. The scene captured here was the Indian Pines test site in northwestern Indiana, USA. It contains an agricultural area exemplified by its crops of common geometry and some irregular forest zones. It consists of 145 ∗ 145 pixels with a spectral resolution of 10 nm and spatial resolution of 20mpp and 224 spectral reflectance bands in the wavelength range of 0.4–2.5 μm, of which 24 noisy bans are removed due to low signal-to-noise ratio. In addition, the scene contains 16 different classes of land covers. The IP dataset acquires ImbR = 73.6.(b)
Salinas Valley (SV): this scene was obtained by AVIRIS sensor over various agricultural fields of Salinas Valley, California, USA, in 1998. The scene is characterized by a high spatial resolution of 3.7mpp and spectral resolution of 10 nm. The area is covered by 512 ∗ 217 spectral samples with a wavelength range of 0.4–2.5 μm. Of 224 reflector bands, 20 noisy bands are discarded due to water absorption coverage. The scene comprises 16 different land classes. The SV dataset acquires ImbR = 12.51.(c)
Pavia University (PU): this scene was captured by a Reflective Optics System Imaging Spectrometer (ROSIS-03) sensor during a flight campaign over the University of Pavia in 2001. It possesses 115 spectral bands, of which only 103 are useable. Its spectral coverage is 0.43–0.86 μm, with spectral resolution of 4 nm and spatial resolution of 1.3mpp defined by 610 ∗ 340 pixels. The scene contains 9 classes with urban environmental constructions. The PU dataset acquires ImbR = 19.83.Figure 3
Composite color images (CCIs) of the hyperspectral datasets such as (a) IP, (b) SV, (c) PU and the ground truth images (GTIs), (d) IP, (e) SV, and (f) PU.
(a)(b)(c)(d)(e)(f)


#### 3.1.2. Loading the Dataset and Splitting

The datasets are imported as hypercubes and converted into a processable three-dimensional format. Then, the 3D images are reshaped into a machine-readable 2D format. The dataset is further broken up into training and testing datasets in a ratio of 3 : 2; i.e., we have used 60% of the original individual datasets for training our model, and the residual 40% is set aside for testing the model’s performance. The training set is processed from the next step onwards, while the testing dataset remains intact. The training and testing samples for each dataset are depicted in Table1.Table 1
Original ground truth, training, and testing samples of IP, SV, and PU datasets.
The datasetIndian PinesSalinas ValleyPavia UniversityClass no.Class nameOriginalTrainTestClass nameOriginalTrainTestClass nameOriginalTrainTest1Alfalfa462818Brocoli_green_weeds_120091205804Asphalt6631397926522Corn-notill1428857571Brocoli_green_weeds_2372622361490Meadows186491118974603Corn-mintill830498332cFallow19761186790Gravel209912608394Corn23714295cFallow_rough_plow1394836558Trees3064183812265Grass-pasture483290193Fallow_smooth267816071071Painted metal sheets13458075386Corn-trees730438292Stubble395923751584Bare soil5029301820117Corn-pasture-mowed281711Celery357921471432Bitumen13307985328Hay-windrowed478287191Grapes_untrained1127167624,509Self-blocking bricks3682220914739Oats20128Soil_vinyard_ develop620337222481Shadows94756837910Soybeans-notill972583389Corn_senesced_green_weeds32781967131111Soybeans-mintill24551473982Lettuce_romaine_4wk106864142712Soybeans-clean593356237Lettuce_romaine_5wk1927115677113Wheat20512382Lettuce_romaine_6wk91655036614Woods1265759506Lettuce_romaine_7wk107064242815Buildings-grass-trees-drivers386231155Vinyard_untrained72684361290716Stone-steel-towers935637Vinyard_vertical_trellis18071084723Total1024961504099541293247721652427762566617110


### 3.2. Data Balancing by Resampling

#### 3.2.1. Oversampling Techniques

(1) Random Oversampling (ROS). ROS [18] involves selecting random examples from the minority class with replacements and augmenting the training data with numerous copies of the particular instances so that a specific instance could be chosen many times. Overfitting has been shown to be more likely when ROS is applied.(2) Synthetic Minority Oversampling Technique (SMOTE). Chawla et al. [19] presented SMOTE as an oversampling strategy to avoid the overfitting problem. This method is considered cutting edge and is effective in a wide range of applications, including the HSIs. This approach generates synthetic data based on feature space resemblances between prevailing minority occurrences. Making an artificial instance determines each minority instance’s k-NN, chooses one at random, and then uses linear interpolation to create a new minor instance in the neighborhood. The detailed algorithm of SMOTE is as follows:Step 1:k-nearest neighbors are calculated with minor class samples following Euclidean distance for each minority instance xi.Step 2: a neighborxj is picked in a random manner from the k-nearest neighbors of xi.Step 3: new samplesxnew are produced in between xj and xi:(2)xnew=xi+βxi–xj,whereβ is the random number between 0 and 1.(3) Borderline SMOTE (B-SMOTE). B-SMOTE [20] creates a synthetic sample dividing minor and major groups. This method also aids in the division of the minor and major groups. The minor class observations are first classified using this approach. If all of the neighbors are in the major class, it identifies any minor observation as noise and ignores it while synthesizing synthetic data. Furthermore, it resamples completely from a few border locations that include major and minor classes as neighborhoods.(4) Adaptive Synthetic Minority Oversampling Technique (ADASYN). Haibo He et al. [21], inspired by SMOTE, present ADASYN technique, which has received considerable attention. ADASYN generates minor class samples based on their density distributions. Compared with minority class samples that are simpler to learn, more artificial data are produced for minor class samples that are challenging to learn. It computes each minor instance’s k-NN and then uses the class ratio of the minor and major examples to produce fresh samples. It adaptively alters the decision boundary to concentrate on those samples that are challenging to learn by repeating this process. ADASYN enhances learning of data distribution in two ways: (1) minimizing the bias created by the class imbalance and (2) adjusting the classification decision boundary in the direction of the complicated examples.Training dataset DTR is presumed withn samples {xi, yi}, j = 1, …, n, where xi is an example belonging to the n-dimensional feature space X and yj ∈ Y = {1, −1} defines the class label coupled with xj, and ns and nl denote the number of minority and major class examples, respectively. Thus, ns ≤ nl and ns + nl = n. Based on these notations, the following steps are to be followed:Step 1: compute the degree of class imbalance:i = ns/nl, range of i ∈ (0, 1].Step 2: compute the quantity of synthetic data samples that the minor class needs to produce:(3)R=nl−ns×β,whereβ ∈ [0, 1] is the constraint for specifying the required balance level after the synthetic data creation.Step 3: for every samplexj ∈ minor class, find k-nearest neighbors found on the basis of Euclidean distance in n-dimensional space, and compute the ratio ri described as follows:(4)Pj=Δik,j=1,…,ns,where Δi denotes the amount of samples in the k-nearest neighbors of xi that belong to the major class; thus, Pj ∈ [0, 1].Step 4: standardizePj according to P^j=Pj/∑j=1naPj so that P^j denotes a density distribution ∑jP^j=1.Step 5: calculate the exact number of synthetic data samples that need to be produced for every minority samplexj:(5)ri=P^j×R,whereR is the overall figure of synthetic data instances that needs to be produced for the minor class.Step 6: for every minor class data instancexi, produce ri synthetic data samples by choosing one minor data example in a random way, xzj, from the k-nearest neighbors for data xj:(6)si=xj+xzj–xj×α,where (xzj − xj) is the contrast vector in the n-dimensional space, and α is an arbitrary number: λ ∈ [0, 1].


#### 3.2.2. Undersampling Techniques

(1) Random Undersampling (RUS). The inverse of ROS is RUS [22]. This approach aims to choose and eliminate samples from the major class at random, diminishing the number of examples in the modified data from the major class. However, RUS has the significant disadvantage of discarding useful information.(2) Tomek Links (TLs). TL is a variant of Tomek’s condensed nearest neighbor (CNN) undersampling algorithm [23]. Unlike the CNN technique, which selects samples with their k-NNs from the major class that has to be deleted at random, the TL method employs a rule to select pairs of observations (suppose A and B) that meet the following criteria: (1) the observation B is A’s closest neighbor; (2) the observation A is B’s closest neighbor; and (3) observations A and B are from distinct classes; i.e., A and B are members of the minor and major classes, respectively, or vice versa.(3) Neighborhood Cleaning Rule (NCL). NCL [24] is an undersampling strategy that reduces data based on cleaning to overcome the imbalanced class distribution. One of the benefits of NCL is that it examines the data quality to be destroyed rather than focusing solely on the reduction in data. The data cleansing procedure is intended for samples from major and minor classes. Essentially, NCL is built on the notion of one-sided selection (OSS), a technique to reduce data based on incidences to decrease classes carefully. On NCL, the cleaning data process is conducted independently of the major and minor samples.(4) Edited Nearest Neighbor (ENN). The ENN approach, which was developed by Wilson [25], works by first determining the k-NN of every observation and then determining whether the major class from the observation’s k-NN is the same as the observational class or not. If the observation’s k-NN’s major class differs from the observation’s class, the observation and its k-NN are removed from the dataset. This method is more potent than TL because ENN removes the observation and its k-NN when the observation’s class and the major class from the observation’s k-NN are different, rather than simply the observation and its 1-nearest neighbor. As a result, ENN is likely to provide more thorough data cleaning than TL.


#### 3.2.3. Hybrid Sampling Techniques

(1) SMOTETomek. This method, first proposed by Batista et al. [26], blends the SMOTE’s ability to create synthetic data for the minor class with the TL’s ability to eradicate data from the major class that is identified as TL, i.e., samples of data from the major class that is nearest to the minor class data.(2) SMOTEENN. This method, established by Batista et al. [27], merges the ability of SMOTE to generate synthetic examples for minor classes with the ability of ENN to delete some observations from both classes. Those observations are identified as having different classes between the observation’s class and its k-NN major class.


### 3.3. Tree-Based Ensemble Classifiers

(1) Decision Tree (DT). The most widely used supervised data mining approaches is the DT algorithm [12]. DT uses a divide-and-conquer approach. The operating method is to find a feature possessing the best ability to classify and split data into many subsets in a recursive manner until a stopping criterion is fulfilled. The class is predicted using decision rules derived from the data input. Determining attribute selection parameters such as information gain or Gini index, the root represents the best feature. It can work with both numerical and categorical data. Furthermore, outliers and the missing values have a negligible impact on the model’s results. However, DT uses a greedy technique, which might lead to overfitting [53]. The DT algorithm can be applied as a feature selection strategy in addition to a classification method [54]. The features used to construct splitting rules at internal tree nodes are DT feature selection results. DT is a filter strategy because it measures features rather than classification accuracy.(2) Random Forest. (RF) RF is a well-known ensemble ML approach that stems from DT [13]. While building a model, it can manage the overfitting branch of DT. As a result, many classification models are created, each constructed using a feature selector such as the information gain, Gini index, and gain ratio.These models realize and create an impact on the prediction in a discrete manner [53]. Random sample selection and random feature selection are the essential concepts. All trees in RF are independent of one another, allowing for parallel training and testing. Consider the dataset Sn, which contains n samples (U, V), with U ∈ RS. To begin with, m instances are randomly chosen with replacements from the original dataset Sn. The current decision tree is built using these examples. Second, from the initial S features, p features (p < S) are picked at random. CARTs are produced using the Gini impurity or mean-squared error criterion. Finally, using the majority vote criterion, the categorization result is produced [36].(3) Extra Trees. (ET) ET [15] is an ensemble learning operating mechanism like RF. ET creates classification and regression by combining the results of a large number of uncorrelated trees. The first of two key differences between ET and RF is that ET samples do not require replenishment. The second is that it chooses random attributes to split the tree nodes rather than the best [53]. Furthermore, ET is preferable to RF in the sense that it is faster and allows for very little noise data.(4) Rotation Forest. (RoF) Rodriguez proposed a rotation forest in 2006 [16], based on the random forest concept. Feature transformation being the basic idea behind this algorithm, it aims to enhance the difference and accuracy of the underlying classifier. The following steps are used to create a T-size rotation forest model.Step 1: The feature space denoted asF is segregated into N disjoint sets of features, and every subset contains features of K (=F/N) number.Step 2: A new train set is attained by utilizing a bootstrap algorithm to select 75% of the training data randomly.Step 3: the coefficientAv,h (h ≤ H, v ≤ V) is achieved using the principal component analysis on every sub-feature space Fv,h (h ≤ H, v ≤ V), and the coefficients belonging to each subspace are arranged in a sparse rotation matrix Rv (v ≤ V).Step 4: The columns ofRv are rearranged by duplicating the order of initial features F to produce the rotation matrix Rv′. The new train set Bt′ = [BvRv′, Yt] is produced for training a specific classifier.Step 5: The process mentioned above is repeated on all different train sets and a sequence of specific classifiers is produced. The majority voting rule achieves the final result.(5) Random Rotation Ensemble Forest. (RREF) The idea of RRE was proposed by Blaser and Fryzlewicz [17] in 2016. Regardless of utilizing the identical sequence of the random numbers in the RF algorithm's tree induction phase, similar bootstrap samples and associated feature subset selections at every decision branch for both the trees are made. The random feature rotation has a considerable influence on the resultant data partition. The subsequent tree is not simply a rotated form of the unrotated tree; it has an entirely different orientation and data division. Samples are consistently distributed throughout all possible rotations to execute a random rotation. For n > 2, where n denotes the number of independent normal variates, rotating every angle in spherical coordinates at random does not result in a consistent distribution over all the rotations, implying that some rotations are more common than others.Let us considerx as the unit vector directing towards the n-spherical space at an arbitrary point. The classification trees T split the predictor space into Di disjoint regions, with 1 ≤ i ≤ I, where I denotes the total count of the terminal nodes of T. The random and optimization parameters are denoted by α = {G, w} and β = Di,vi1I, respectively, where G is the random rotation coupled with T, w is the arbitrary tree induction sample pairs, and every randomly rotated input G (x) performs a mapping to a constant vi, which depends on the belonging of the input to a particular region of Di. Thus, the tree with an indicator function J (.) formulates as follows:(7)Tx;α,β=∑i=1IviJGx∈Di.


### 3.4. Model Simulation

A classification model is built using each of the 10 resampling techniques taken one at a time. The balanced data are then classified using each of the 5 tree-based ensemble classifiers separately, as shown in Figure2. Therefore, our comparative experiments consist of a total of 50 training models for each dataset. Every model construction requires a suitable hyperparameter setting. For oversampling, we have mostly chosen the minor classes to create a similar number of samples as the major classes; thus, the sampling strategy is “minority.” Correspondingly, the sampling strategy for undersampling techniques is chosen “majority,” where the redundant major class samples are removed to match up with the minor class samples. We first set the base oversampler and undersampler with previously stated parameters and then set the sampling strategy as “all” to the hybrid sampler for the hybrid sampling. Also, for SMOTE and ADASYN, we have taken 5 k-nearest neighbors, whereas for NCL and ENN we chose 3 k-nearest neighbors. The hyperparameters that are set for the classifiers are shown in Table 2.Table 2
Hyperparameter setting for the different tree-based ensemble classifiers.
Tree-based classifiersHyperparameterNumber of treesCriterion for split qualityMaximum depth of treeMaximum number of features for best splitDT—Entropy5020ET500Entropy5020RF500Gini10050RoF1000Gini10050RREF1000Gini200100


## 3.1. Data Preprocessing

### 3.1.1. Dataset

For our experiment, we collected three mostly explored hyperspectral datasets that are available in the public domain [52] and stored in the memory of our system. A brief elaboration of the datasets is as follows, along with Figure 3.(a)
AVIRIS Indian Pines (IP): this dataset was captured by Airborne Visible/Infrared Imaging Spectrometer (AVIRIS) sensor on June 12, 1992. The scene captured here was the Indian Pines test site in northwestern Indiana, USA. It contains an agricultural area exemplified by its crops of common geometry and some irregular forest zones. It consists of 145 ∗ 145 pixels with a spectral resolution of 10 nm and spatial resolution of 20mpp and 224 spectral reflectance bands in the wavelength range of 0.4–2.5 μm, of which 24 noisy bans are removed due to low signal-to-noise ratio. In addition, the scene contains 16 different classes of land covers. The IP dataset acquires ImbR = 73.6.(b)
Salinas Valley (SV): this scene was obtained by AVIRIS sensor over various agricultural fields of Salinas Valley, California, USA, in 1998. The scene is characterized by a high spatial resolution of 3.7mpp and spectral resolution of 10 nm. The area is covered by 512 ∗ 217 spectral samples with a wavelength range of 0.4–2.5 μm. Of 224 reflector bands, 20 noisy bands are discarded due to water absorption coverage. The scene comprises 16 different land classes. The SV dataset acquires ImbR = 12.51.(c)
Pavia University (PU): this scene was captured by a Reflective Optics System Imaging Spectrometer (ROSIS-03) sensor during a flight campaign over the University of Pavia in 2001. It possesses 115 spectral bands, of which only 103 are useable. Its spectral coverage is 0.43–0.86 μm, with spectral resolution of 4 nm and spatial resolution of 1.3mpp defined by 610 ∗ 340 pixels. The scene contains 9 classes with urban environmental constructions. The PU dataset acquires ImbR = 19.83.Figure 3
Composite color images (CCIs) of the hyperspectral datasets such as (a) IP, (b) SV, (c) PU and the ground truth images (GTIs), (d) IP, (e) SV, and (f) PU.
(a)(b)(c)(d)(e)(f)


### 3.1.2. Loading the Dataset and Splitting

The datasets are imported as hypercubes and converted into a processable three-dimensional format. Then, the 3D images are reshaped into a machine-readable 2D format. The dataset is further broken up into training and testing datasets in a ratio of 3 : 2; i.e., we have used 60% of the original individual datasets for training our model, and the residual 40% is set aside for testing the model’s performance. The training set is processed from the next step onwards, while the testing dataset remains intact. The training and testing samples for each dataset are depicted in Table1.Table 1
Original ground truth, training, and testing samples of IP, SV, and PU datasets.
The datasetIndian PinesSalinas ValleyPavia UniversityClass no.Class nameOriginalTrainTestClass nameOriginalTrainTestClass nameOriginalTrainTest1Alfalfa462818Brocoli_green_weeds_120091205804Asphalt6631397926522Corn-notill1428857571Brocoli_green_weeds_2372622361490Meadows186491118974603Corn-mintill830498332cFallow19761186790Gravel209912608394Corn23714295cFallow_rough_plow1394836558Trees3064183812265Grass-pasture483290193Fallow_smooth267816071071Painted metal sheets13458075386Corn-trees730438292Stubble395923751584Bare soil5029301820117Corn-pasture-mowed281711Celery357921471432Bitumen13307985328Hay-windrowed478287191Grapes_untrained1127167624,509Self-blocking bricks3682220914739Oats20128Soil_vinyard_ develop620337222481Shadows94756837910Soybeans-notill972583389Corn_senesced_green_weeds32781967131111Soybeans-mintill24551473982Lettuce_romaine_4wk106864142712Soybeans-clean593356237Lettuce_romaine_5wk1927115677113Wheat20512382Lettuce_romaine_6wk91655036614Woods1265759506Lettuce_romaine_7wk107064242815Buildings-grass-trees-drivers386231155Vinyard_untrained72684361290716Stone-steel-towers935637Vinyard_vertical_trellis18071084723Total1024961504099541293247721652427762566617110


## 3.1.1. Dataset

For our experiment, we collected three mostly explored hyperspectral datasets that are available in the public domain [52] and stored in the memory of our system. A brief elaboration of the datasets is as follows, along with Figure 3.(a)
AVIRIS Indian Pines (IP): this dataset was captured by Airborne Visible/Infrared Imaging Spectrometer (AVIRIS) sensor on June 12, 1992. The scene captured here was the Indian Pines test site in northwestern Indiana, USA. It contains an agricultural area exemplified by its crops of common geometry and some irregular forest zones. It consists of 145 ∗ 145 pixels with a spectral resolution of 10 nm and spatial resolution of 20mpp and 224 spectral reflectance bands in the wavelength range of 0.4–2.5 μm, of which 24 noisy bans are removed due to low signal-to-noise ratio. In addition, the scene contains 16 different classes of land covers. The IP dataset acquires ImbR = 73.6.(b)
Salinas Valley (SV): this scene was obtained by AVIRIS sensor over various agricultural fields of Salinas Valley, California, USA, in 1998. The scene is characterized by a high spatial resolution of 3.7mpp and spectral resolution of 10 nm. The area is covered by 512 ∗ 217 spectral samples with a wavelength range of 0.4–2.5 μm. Of 224 reflector bands, 20 noisy bands are discarded due to water absorption coverage. The scene comprises 16 different land classes. The SV dataset acquires ImbR = 12.51.(c)
Pavia University (PU): this scene was captured by a Reflective Optics System Imaging Spectrometer (ROSIS-03) sensor during a flight campaign over the University of Pavia in 2001. It possesses 115 spectral bands, of which only 103 are useable. Its spectral coverage is 0.43–0.86 μm, with spectral resolution of 4 nm and spatial resolution of 1.3mpp defined by 610 ∗ 340 pixels. The scene contains 9 classes with urban environmental constructions. The PU dataset acquires ImbR = 19.83.Figure 3
Composite color images (CCIs) of the hyperspectral datasets such as (a) IP, (b) SV, (c) PU and the ground truth images (GTIs), (d) IP, (e) SV, and (f) PU.
(a)(b)(c)(d)(e)(f)


## 3.1.2. Loading the Dataset and Splitting

The datasets are imported as hypercubes and converted into a processable three-dimensional format. Then, the 3D images are reshaped into a machine-readable 2D format. The dataset is further broken up into training and testing datasets in a ratio of 3 : 2; i.e., we have used 60% of the original individual datasets for training our model, and the residual 40% is set aside for testing the model’s performance. The training set is processed from the next step onwards, while the testing dataset remains intact. The training and testing samples for each dataset are depicted in Table1.Table 1
Original ground truth, training, and testing samples of IP, SV, and PU datasets.
The datasetIndian PinesSalinas ValleyPavia UniversityClass no.Class nameOriginalTrainTestClass nameOriginalTrainTestClass nameOriginalTrainTest1Alfalfa462818Brocoli_green_weeds_120091205804Asphalt6631397926522Corn-notill1428857571Brocoli_green_weeds_2372622361490Meadows186491118974603Corn-mintill830498332cFallow19761186790Gravel209912608394Corn23714295cFallow_rough_plow1394836558Trees3064183812265Grass-pasture483290193Fallow_smooth267816071071Painted metal sheets13458075386Corn-trees730438292Stubble395923751584Bare soil5029301820117Corn-pasture-mowed281711Celery357921471432Bitumen13307985328Hay-windrowed478287191Grapes_untrained1127167624,509Self-blocking bricks3682220914739Oats20128Soil_vinyard_ develop620337222481Shadows94756837910Soybeans-notill972583389Corn_senesced_green_weeds32781967131111Soybeans-mintill24551473982Lettuce_romaine_4wk106864142712Soybeans-clean593356237Lettuce_romaine_5wk1927115677113Wheat20512382Lettuce_romaine_6wk91655036614Woods1265759506Lettuce_romaine_7wk107064242815Buildings-grass-trees-drivers386231155Vinyard_untrained72684361290716Stone-steel-towers935637Vinyard_vertical_trellis18071084723Total1024961504099541293247721652427762566617110


## 3.2. Data Balancing by Resampling

### 3.2.1. Oversampling Techniques

(1) Random Oversampling (ROS). ROS [18] involves selecting random examples from the minority class with replacements and augmenting the training data with numerous copies of the particular instances so that a specific instance could be chosen many times. Overfitting has been shown to be more likely when ROS is applied.(2) Synthetic Minority Oversampling Technique (SMOTE). Chawla et al. [19] presented SMOTE as an oversampling strategy to avoid the overfitting problem. This method is considered cutting edge and is effective in a wide range of applications, including the HSIs. This approach generates synthetic data based on feature space resemblances between prevailing minority occurrences. Making an artificial instance determines each minority instance’s k-NN, chooses one at random, and then uses linear interpolation to create a new minor instance in the neighborhood. The detailed algorithm of SMOTE is as follows:Step 1:k-nearest neighbors are calculated with minor class samples following Euclidean distance for each minority instance xi.Step 2: a neighborxj is picked in a random manner from the k-nearest neighbors of xi.Step 3: new samplesxnew are produced in between xj and xi:(2)xnew=xi+βxi–xj,whereβ is the random number between 0 and 1.(3) Borderline SMOTE (B-SMOTE). B-SMOTE [20] creates a synthetic sample dividing minor and major groups. This method also aids in the division of the minor and major groups. The minor class observations are first classified using this approach. If all of the neighbors are in the major class, it identifies any minor observation as noise and ignores it while synthesizing synthetic data. Furthermore, it resamples completely from a few border locations that include major and minor classes as neighborhoods.(4) Adaptive Synthetic Minority Oversampling Technique (ADASYN). Haibo He et al. [21], inspired by SMOTE, present ADASYN technique, which has received considerable attention. ADASYN generates minor class samples based on their density distributions. Compared with minority class samples that are simpler to learn, more artificial data are produced for minor class samples that are challenging to learn. It computes each minor instance’s k-NN and then uses the class ratio of the minor and major examples to produce fresh samples. It adaptively alters the decision boundary to concentrate on those samples that are challenging to learn by repeating this process. ADASYN enhances learning of data distribution in two ways: (1) minimizing the bias created by the class imbalance and (2) adjusting the classification decision boundary in the direction of the complicated examples.Training dataset DTR is presumed withn samples {xi, yi}, j = 1, …, n, where xi is an example belonging to the n-dimensional feature space X and yj ∈ Y = {1, −1} defines the class label coupled with xj, and ns and nl denote the number of minority and major class examples, respectively. Thus, ns ≤ nl and ns + nl = n. Based on these notations, the following steps are to be followed:Step 1: compute the degree of class imbalance:i = ns/nl, range of i ∈ (0, 1].Step 2: compute the quantity of synthetic data samples that the minor class needs to produce:(3)R=nl−ns×β,whereβ ∈ [0, 1] is the constraint for specifying the required balance level after the synthetic data creation.Step 3: for every samplexj ∈ minor class, find k-nearest neighbors found on the basis of Euclidean distance in n-dimensional space, and compute the ratio ri described as follows:(4)Pj=Δik,j=1,…,ns,where Δi denotes the amount of samples in the k-nearest neighbors of xi that belong to the major class; thus, Pj ∈ [0, 1].Step 4: standardizePj according to P^j=Pj/∑j=1naPj so that P^j denotes a density distribution ∑jP^j=1.Step 5: calculate the exact number of synthetic data samples that need to be produced for every minority samplexj:(5)ri=P^j×R,whereR is the overall figure of synthetic data instances that needs to be produced for the minor class.Step 6: for every minor class data instancexi, produce ri synthetic data samples by choosing one minor data example in a random way, xzj, from the k-nearest neighbors for data xj:(6)si=xj+xzj–xj×α,where (xzj − xj) is the contrast vector in the n-dimensional space, and α is an arbitrary number: λ ∈ [0, 1].


### 3.2.2. Undersampling Techniques

(1) Random Undersampling (RUS). The inverse of ROS is RUS [22]. This approach aims to choose and eliminate samples from the major class at random, diminishing the number of examples in the modified data from the major class. However, RUS has the significant disadvantage of discarding useful information.(2) Tomek Links (TLs). TL is a variant of Tomek’s condensed nearest neighbor (CNN) undersampling algorithm [23]. Unlike the CNN technique, which selects samples with their k-NNs from the major class that has to be deleted at random, the TL method employs a rule to select pairs of observations (suppose A and B) that meet the following criteria: (1) the observation B is A’s closest neighbor; (2) the observation A is B’s closest neighbor; and (3) observations A and B are from distinct classes; i.e., A and B are members of the minor and major classes, respectively, or vice versa.(3) Neighborhood Cleaning Rule (NCL). NCL [24] is an undersampling strategy that reduces data based on cleaning to overcome the imbalanced class distribution. One of the benefits of NCL is that it examines the data quality to be destroyed rather than focusing solely on the reduction in data. The data cleansing procedure is intended for samples from major and minor classes. Essentially, NCL is built on the notion of one-sided selection (OSS), a technique to reduce data based on incidences to decrease classes carefully. On NCL, the cleaning data process is conducted independently of the major and minor samples.(4) Edited Nearest Neighbor (ENN). The ENN approach, which was developed by Wilson [25], works by first determining the k-NN of every observation and then determining whether the major class from the observation’s k-NN is the same as the observational class or not. If the observation’s k-NN’s major class differs from the observation’s class, the observation and its k-NN are removed from the dataset. This method is more potent than TL because ENN removes the observation and its k-NN when the observation’s class and the major class from the observation’s k-NN are different, rather than simply the observation and its 1-nearest neighbor. As a result, ENN is likely to provide more thorough data cleaning than TL.


### 3.2.3. Hybrid Sampling Techniques

(1) SMOTETomek. This method, first proposed by Batista et al. [26], blends the SMOTE’s ability to create synthetic data for the minor class with the TL’s ability to eradicate data from the major class that is identified as TL, i.e., samples of data from the major class that is nearest to the minor class data.(2) SMOTEENN. This method, established by Batista et al. [27], merges the ability of SMOTE to generate synthetic examples for minor classes with the ability of ENN to delete some observations from both classes. Those observations are identified as having different classes between the observation’s class and its k-NN major class.


## 3.2.1. Oversampling Techniques

(1) Random Oversampling (ROS). ROS [18] involves selecting random examples from the minority class with replacements and augmenting the training data with numerous copies of the particular instances so that a specific instance could be chosen many times. Overfitting has been shown to be more likely when ROS is applied.(2) Synthetic Minority Oversampling Technique (SMOTE). Chawla et al. [19] presented SMOTE as an oversampling strategy to avoid the overfitting problem. This method is considered cutting edge and is effective in a wide range of applications, including the HSIs. This approach generates synthetic data based on feature space resemblances between prevailing minority occurrences. Making an artificial instance determines each minority instance’s k-NN, chooses one at random, and then uses linear interpolation to create a new minor instance in the neighborhood. The detailed algorithm of SMOTE is as follows:Step 1:k-nearest neighbors are calculated with minor class samples following Euclidean distance for each minority instance xi.Step 2: a neighborxj is picked in a random manner from the k-nearest neighbors of xi.Step 3: new samplesxnew are produced in between xj and xi:(2)xnew=xi+βxi–xj,whereβ is the random number between 0 and 1.(3) Borderline SMOTE (B-SMOTE). B-SMOTE [20] creates a synthetic sample dividing minor and major groups. This method also aids in the division of the minor and major groups. The minor class observations are first classified using this approach. If all of the neighbors are in the major class, it identifies any minor observation as noise and ignores it while synthesizing synthetic data. Furthermore, it resamples completely from a few border locations that include major and minor classes as neighborhoods.(4) Adaptive Synthetic Minority Oversampling Technique (ADASYN). Haibo He et al. [21], inspired by SMOTE, present ADASYN technique, which has received considerable attention. ADASYN generates minor class samples based on their density distributions. Compared with minority class samples that are simpler to learn, more artificial data are produced for minor class samples that are challenging to learn. It computes each minor instance’s k-NN and then uses the class ratio of the minor and major examples to produce fresh samples. It adaptively alters the decision boundary to concentrate on those samples that are challenging to learn by repeating this process. ADASYN enhances learning of data distribution in two ways: (1) minimizing the bias created by the class imbalance and (2) adjusting the classification decision boundary in the direction of the complicated examples.Training dataset DTR is presumed withn samples {xi, yi}, j = 1, …, n, where xi is an example belonging to the n-dimensional feature space X and yj ∈ Y = {1, −1} defines the class label coupled with xj, and ns and nl denote the number of minority and major class examples, respectively. Thus, ns ≤ nl and ns + nl = n. Based on these notations, the following steps are to be followed:Step 1: compute the degree of class imbalance:i = ns/nl, range of i ∈ (0, 1].Step 2: compute the quantity of synthetic data samples that the minor class needs to produce:(3)R=nl−ns×β,whereβ ∈ [0, 1] is the constraint for specifying the required balance level after the synthetic data creation.Step 3: for every samplexj ∈ minor class, find k-nearest neighbors found on the basis of Euclidean distance in n-dimensional space, and compute the ratio ri described as follows:(4)Pj=Δik,j=1,…,ns,where Δi denotes the amount of samples in the k-nearest neighbors of xi that belong to the major class; thus, Pj ∈ [0, 1].Step 4: standardizePj according to P^j=Pj/∑j=1naPj so that P^j denotes a density distribution ∑jP^j=1.Step 5: calculate the exact number of synthetic data samples that need to be produced for every minority samplexj:(5)ri=P^j×R,whereR is the overall figure of synthetic data instances that needs to be produced for the minor class.Step 6: for every minor class data instancexi, produce ri synthetic data samples by choosing one minor data example in a random way, xzj, from the k-nearest neighbors for data xj:(6)si=xj+xzj–xj×α,where (xzj − xj) is the contrast vector in the n-dimensional space, and α is an arbitrary number: λ ∈ [0, 1].


## 3.2.2. Undersampling Techniques

(1) Random Undersampling (RUS). The inverse of ROS is RUS [22]. This approach aims to choose and eliminate samples from the major class at random, diminishing the number of examples in the modified data from the major class. However, RUS has the significant disadvantage of discarding useful information.(2) Tomek Links (TLs). TL is a variant of Tomek’s condensed nearest neighbor (CNN) undersampling algorithm [23]. Unlike the CNN technique, which selects samples with their k-NNs from the major class that has to be deleted at random, the TL method employs a rule to select pairs of observations (suppose A and B) that meet the following criteria: (1) the observation B is A’s closest neighbor; (2) the observation A is B’s closest neighbor; and (3) observations A and B are from distinct classes; i.e., A and B are members of the minor and major classes, respectively, or vice versa.(3) Neighborhood Cleaning Rule (NCL). NCL [24] is an undersampling strategy that reduces data based on cleaning to overcome the imbalanced class distribution. One of the benefits of NCL is that it examines the data quality to be destroyed rather than focusing solely on the reduction in data. The data cleansing procedure is intended for samples from major and minor classes. Essentially, NCL is built on the notion of one-sided selection (OSS), a technique to reduce data based on incidences to decrease classes carefully. On NCL, the cleaning data process is conducted independently of the major and minor samples.(4) Edited Nearest Neighbor (ENN). The ENN approach, which was developed by Wilson [25], works by first determining the k-NN of every observation and then determining whether the major class from the observation’s k-NN is the same as the observational class or not. If the observation’s k-NN’s major class differs from the observation’s class, the observation and its k-NN are removed from the dataset. This method is more potent than TL because ENN removes the observation and its k-NN when the observation’s class and the major class from the observation’s k-NN are different, rather than simply the observation and its 1-nearest neighbor. As a result, ENN is likely to provide more thorough data cleaning than TL.


## 3.2.3. Hybrid Sampling Techniques

(1) SMOTETomek. This method, first proposed by Batista et al. [26], blends the SMOTE’s ability to create synthetic data for the minor class with the TL’s ability to eradicate data from the major class that is identified as TL, i.e., samples of data from the major class that is nearest to the minor class data.(2) SMOTEENN. This method, established by Batista et al. [27], merges the ability of SMOTE to generate synthetic examples for minor classes with the ability of ENN to delete some observations from both classes. Those observations are identified as having different classes between the observation’s class and its k-NN major class.


## 3.3. Tree-Based Ensemble Classifiers

(1) Decision Tree (DT). The most widely used supervised data mining approaches is the DT algorithm [12]. DT uses a divide-and-conquer approach. The operating method is to find a feature possessing the best ability to classify and split data into many subsets in a recursive manner until a stopping criterion is fulfilled. The class is predicted using decision rules derived from the data input. Determining attribute selection parameters such as information gain or Gini index, the root represents the best feature. It can work with both numerical and categorical data. Furthermore, outliers and the missing values have a negligible impact on the model’s results. However, DT uses a greedy technique, which might lead to overfitting [53]. The DT algorithm can be applied as a feature selection strategy in addition to a classification method [54]. The features used to construct splitting rules at internal tree nodes are DT feature selection results. DT is a filter strategy because it measures features rather than classification accuracy.(2) Random Forest. (RF) RF is a well-known ensemble ML approach that stems from DT [13]. While building a model, it can manage the overfitting branch of DT. As a result, many classification models are created, each constructed using a feature selector such as the information gain, Gini index, and gain ratio.These models realize and create an impact on the prediction in a discrete manner [53]. Random sample selection and random feature selection are the essential concepts. All trees in RF are independent of one another, allowing for parallel training and testing. Consider the dataset Sn, which contains n samples (U, V), with U ∈ RS. To begin with, m instances are randomly chosen with replacements from the original dataset Sn. The current decision tree is built using these examples. Second, from the initial S features, p features (p < S) are picked at random. CARTs are produced using the Gini impurity or mean-squared error criterion. Finally, using the majority vote criterion, the categorization result is produced [36].(3) Extra Trees. (ET) ET [15] is an ensemble learning operating mechanism like RF. ET creates classification and regression by combining the results of a large number of uncorrelated trees. The first of two key differences between ET and RF is that ET samples do not require replenishment. The second is that it chooses random attributes to split the tree nodes rather than the best [53]. Furthermore, ET is preferable to RF in the sense that it is faster and allows for very little noise data.(4) Rotation Forest. (RoF) Rodriguez proposed a rotation forest in 2006 [16], based on the random forest concept. Feature transformation being the basic idea behind this algorithm, it aims to enhance the difference and accuracy of the underlying classifier. The following steps are used to create a T-size rotation forest model.Step 1: The feature space denoted asF is segregated into N disjoint sets of features, and every subset contains features of K (=F/N) number.Step 2: A new train set is attained by utilizing a bootstrap algorithm to select 75% of the training data randomly.Step 3: the coefficientAv,h (h ≤ H, v ≤ V) is achieved using the principal component analysis on every sub-feature space Fv,h (h ≤ H, v ≤ V), and the coefficients belonging to each subspace are arranged in a sparse rotation matrix Rv (v ≤ V).Step 4: The columns ofRv are rearranged by duplicating the order of initial features F to produce the rotation matrix Rv′. The new train set Bt′ = [BvRv′, Yt] is produced for training a specific classifier.Step 5: The process mentioned above is repeated on all different train sets and a sequence of specific classifiers is produced. The majority voting rule achieves the final result.(5) Random Rotation Ensemble Forest. (RREF) The idea of RRE was proposed by Blaser and Fryzlewicz [17] in 2016. Regardless of utilizing the identical sequence of the random numbers in the RF algorithm's tree induction phase, similar bootstrap samples and associated feature subset selections at every decision branch for both the trees are made. The random feature rotation has a considerable influence on the resultant data partition. The subsequent tree is not simply a rotated form of the unrotated tree; it has an entirely different orientation and data division. Samples are consistently distributed throughout all possible rotations to execute a random rotation. For n > 2, where n denotes the number of independent normal variates, rotating every angle in spherical coordinates at random does not result in a consistent distribution over all the rotations, implying that some rotations are more common than others.Let us considerx as the unit vector directing towards the n-spherical space at an arbitrary point. The classification trees T split the predictor space into Di disjoint regions, with 1 ≤ i ≤ I, where I denotes the total count of the terminal nodes of T. The random and optimization parameters are denoted by α = {G, w} and β = Di,vi1I, respectively, where G is the random rotation coupled with T, w is the arbitrary tree induction sample pairs, and every randomly rotated input G (x) performs a mapping to a constant vi, which depends on the belonging of the input to a particular region of Di. Thus, the tree with an indicator function J (.) formulates as follows:(7)Tx;α,β=∑i=1IviJGx∈Di.


## 3.4. Model Simulation

A classification model is built using each of the 10 resampling techniques taken one at a time. The balanced data are then classified using each of the 5 tree-based ensemble classifiers separately, as shown in Figure2. Therefore, our comparative experiments consist of a total of 50 training models for each dataset. Every model construction requires a suitable hyperparameter setting. For oversampling, we have mostly chosen the minor classes to create a similar number of samples as the major classes; thus, the sampling strategy is “minority.” Correspondingly, the sampling strategy for undersampling techniques is chosen “majority,” where the redundant major class samples are removed to match up with the minor class samples. We first set the base oversampler and undersampler with previously stated parameters and then set the sampling strategy as “all” to the hybrid sampler for the hybrid sampling. Also, for SMOTE and ADASYN, we have taken 5 k-nearest neighbors, whereas for NCL and ENN we chose 3 k-nearest neighbors. The hyperparameters that are set for the classifiers are shown in Table 2.Table 2
Hyperparameter setting for the different tree-based ensemble classifiers.
Tree-based classifiersHyperparameterNumber of treesCriterion for split qualityMaximum depth of treeMaximum number of features for best splitDT—Entropy5020ET500Entropy5020RF500Gini10050RoF1000Gini10050RREF1000Gini200100


## 4. Experimental Outcomes

### 4.1. Experimental Setup

All program codes are implemented using Python language with its latest versions of embedded packages, such as Keras, TensorFlow, and scikit. The hardware specifications are Intel® Core™ i5-10300H Processor, 2.5 GHz, 8 GB DDR4 2933 MHz RAM, and 4 GB NVIDIA GeForce GTX 1650 Ti. After splitting the original dataset into train and test sets, we (1) apply the resampling techniques, viz. 4 oversampling, 4 undersampling, and 2 hybrid sampling strategies to our datasets individually; (2) train each of the tree-based ensemble classifier models with each resampling method; (3) obtain the classification performance using the assessment metrics; and (4) present a detailed comparative analysis based on the obtained metric statistics. We have uniformly overpopulated the selected minor class samples and removed neighborly linked major class samples to balance the individual dataset. The same strategy is used in combination for the hybrid sampling. The hyperparameter setting for the classifiers is as follows:(1)
For DT, ET, RF, and RREF, we have used the Gini criterion with a maximum tree depth of 100 and the number of estimators as 1000, keeping the other hyperparameters as default.(2)
For RoF, we have taken 1000 number of trees and a total of 20 features, keeping the rest as default.


### 4.2. Performance Evaluation Metrics (PEM)

In this work, we have adopted five prime metrics to assess our model’s performance: precision, recall,F score, Cohen kappa, overall accuracy, and the time elapsed to execute the entire process. These are described as follows.Let us denoteY=the total number of class labels in the dataset, bii = true prediction of ith class, bji = false prediction of ith class, and bij = false prediction of ith class into jth class.(1) Precision Score. Precision is used to assess each class classification accuracy in the imbalanced data. The precision score is expected to be high for a better classifier. The precision score (Prec_score%) measures the testing prediction rate of all samples and is defined in the following equation:(8)Prec_Score%=1Ybii∑i=1Ybji×100.(2) Recall Score. Recall or true-positive rate is the percentage of correctly classified events. The recall is especially well suited to assessing classification systems dealing with many skewed data classes. The large recall value indicates the better performance of a classifier. The Rec_score% is given by the following equation:(9)Rec_Score%=1Y∑i=1Ybii∑i=1Ybij×100.(3) F_Score. In the classification of imbalanced data, the F-measure, an assessment index derived by combining precision and recall, has been widely employed. The introduction of F-measure combines the two, and the greater the F-measure, the better the classifier’s performance. The computation of F_score% is given as follows:(10)F_Score%=2Y∑i=1YRi⋅∑i=1YPi∑i=1YRi+∑i=1YPi×100,where Ri and Pi denote the precision and recall of class i, respectively.(4) Cohen_Kappa_Score. Cohen kappa is a statistic that evaluates the predictability of the findings and determines whether the consistency is genuinely random. The greater the Cohen_kappa, the better the classifier’s performance. Kappa_score% is equated as follows:(11)Kappa_Score%=Overall Accuracy−∑i=1Yqi⋅qi′1−∑i=1Yqi⋅qi′×100,where qi and qi′ denote the original and predicted sample sizes of class i, respectively.(5) Overall Accuracy. Overall accuracy, being a performance-metric, assigns the similar weight to every of the data types, regardless of their number of instances. The definition of OA is given as follows:(12)OA%=1Y∑i=1Ybii∑i=1Ybji+bii×100.(6) Time Elapsed. Time complexity is a factor in real-time computation. Lesser the time complexity, the higher the quality of the classifier. Time elapsed for execution is defined as follows:(13)TEin seconds=End time of execution–Start time of execution.


### 4.3. Comparative Performance Analysis of the Model

#### 4.3.1. For Indian Pines Dataset

(1) Effect of Oversampling. Table 3 describes the comparison between the tree-based classifier model performances due to the oversampling of the data. It is evident that SMOTE achieves better results in all performance metrics for all classifiers. RREF attains the highest accuracy of 89.49%, with an approximation of 1.32, slightly higher than RoF. Also, the total time consumed is maximum for ADASYN for all the classifiers, especially for RoF.Table 3
Performance comparison between the oversampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall,F score, kappa, and OA and TE calculated in seconds for the IP dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTROS68.41 ± 1.867.13 ± 2.1867.47 ± 2.6144.62 ± 1.4767.06 ± 1.743.516SMOTE69.5 ± 2.4968.77 ± 2.8768.84 ± 2.9545.92 ± 1.468.68 ± 1.934.629B-SMOTE68.37 ± 1.667.51 ± 2.0968.14 ± 2.1945.89 ± 2.2168.42 ± 1.836.495ADASYN68.48 ± 2.6567.74 ± 1.5668.19 ± 2.3545.41 ± 2.4668.53 ± 1.387.895ETROS79.25 ± 2.1280.61 ± 1.2679.56 ± 1.3960.43 ± 1.1480.57 ± 1.246.439SMOTE79.98 ± 2.6881.25 ± 2.8580.24 ± 2.1362.3 ± 1.0882.28 ± 1.767.867B-SMOTE79.57 ± 1.5881.16 ± 2.6179.95 ± 3.0260.76 ± 2.1981.99 ± 1.259.137ADASYN79.89 ± 2.2880.93 ± 2.9480.18 ± 1.4462.21 ± 2.3182.08 ± 1.099.248RFROS80.13 ± 1.1281.15 ± 2.5580.54 ± 1.2871.8 ± 2.2783.54 ± 1.896.256SMOTE88.96 ± 1.1281.72 ± 1.7980.95 ± 1.1572.98 ± 1.3284.72 ± 1.128.282B-SMOTE89.35 ± 1.7680.91 ± 1.779.82 ± 2.5161.86 ± 1.3783.07 ± 1.210.056ADASYN89.87 ± 1.6381.33 ± 1.6780.26 ± 2.3472.05 ± 2.7483.87 ± 1.7810.01RoFROS84.32 ± 1.1284.45 ± 1.1184.5 ± 1.3777.28 ± 1.8785.15 ± 1.073274.945SMOTE89.5 ± 2.0789.53 ± 1.0189.37 ± 1.0681.34 ± 2.2588.99 ± 1.853645.765B-SMOTE88.16 ± 1.6586.67 ± 2.737.39 ± 1.4279.84 ± 2.487.65 ± 1.733958.983ADASYN88.93 ± 2.6188.56 ± 2.9589.11 ± 2.4780.37 ± 2.9588.46 ± 1.683979.156RREFROS86.36 ± 1.3187.92 ± 1.2685.75 ± 2.5779.84 ± 2.184.94 ± 1.0943.875SMOTE89.71 ± 2.4690.15 ± 2.7691.21 ± 1.183.48 ± 1.7389.49 ± 1.3256.953B-SMOTE88.73 ± 2.9288.94 ± 2.189.44 ± 2.9479.8 ± 1.7888.47 ± 1.9455.326ADASYN89.56 ± 2.289.85 ± 2.7290.37 ± 1.0280.36 ± 2.3289.08 ± 1.5361.578(2) Effect of Undersampling. Table 4 describes the comparison between the tree-based classifier model performances due to the oversampling of the data. It is imperative that TL achieves better results in all performance metrics for all classifiers, except for DT, where NCL attains the highest OA. RREF attains the highest accuracy of 85.32%, with an approximation of 2.76, which is slightly higher than RoF. Also, the total time consumed is maximum for TL for all the classifiers, especially for RoF.Table 4
Performance comparison between the undersampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the IP dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTRUS53.16 ± 1.0727.3 ± 1.3526.27 ± 1.723.92 ± 1.6827.35 ± 1.50.045Tomek68.59 ± 1.0968.44 ± 1.6668.46 ± 1.6944.14 ± 1.4568.42 ± 1.582.93NCL68.44 ± 1.3574.74 ± 1.669.9 ± 1.4644.68 ± 1.4669.98 ± 1.042.079ENN66.34 ± 1.367.51 ± 1.2266.57 ± 1.5743.46 ± 1.2467.52 ± 2.211.16ETRUS65.37 ± 1.6638.29 ± 1.2837.95 ± 1.0938.95 ± 1.7538.19 ± 2.830.216Tomek78.32 ± 1.1180.42 ± 1.1578.89 ± 1.3658.91 ± 1.5379.95 ± 2.63.734NCL75.17 ± 1.4676.65 ± 1.3975.28 ± 1.2354.61 ± 1.9576.6 ± 2.592.406ENN72.3 ± 1.3773.76 ± 1.2972.24 ± 1.8251.44 ± 1.4173.75 ± 2.311.248RFRUS64.84 ± 1.5634.15 ± 1.2732.23 ± 1.0947.22 ± 1.7634.06 ± 1.030.214Tomek79.4 ± 1.7380.69 ± 1.3679.46 ± 1.1561.25 ± 1.3880.6 ± 1.584.297NCL75.68 ± 1.0477.1 ± 1.175.68 ± 1.4356.29 ± 176.96 ± 2.723.557ENN71.36 ± 1.3772.84 ± 1.4171.14 ± 1.6351.55 ± 1.9572.77 ± 2.540.515RoFRUS67.87 ± 1.2637.61 ± 1.1338.62 ± 1.4149.5 ± 1.3540.84 ± 1.96957.643Tomek80.5 ± 1.3482.14 ± 1.3880.31 ± 1.4976.35 ± 1.1984.83 ± 2.081267.89NCL74.33 ± 1.5874.89 ± 1.1574.29 ± 1.4563.44 ± 1.479.25 ± 2.771043.895ENN73.77 ± 1.3172.61 ± 1.1669.53 ± 1.159.83 ± 1.5474.12 ± 1.68996.054RREFRUS69.11 ± 1.5538.17 ± 1.4639.21 ± 1.1456.3 ± 1.0444.37 ± 2.415.946Tomek82.47 ± 1.2482.61 ± 1.4780.48 ± 1.3778.58 ± 1.6385.32 ± 2.769.279NCL75.47 ± 1.2375.97 ± 1.1972.13 ± 1.6662.1 ± 1.2779.85 ± 1.156.789ENN73.58 ± 1.6271.51 ± 1.7569.88 ± 1.2860.62 ± 175.31 ± 2.096.241(3) Effect of Hybrid Sampling. Table 5 compares the tree-based classifier model performances due to the hybrid sampling of the data. It can be inferred that SMOTETomek achieves better results in all performance metrics for all classifiers. RoF attains the highest accuracy of 82.74%, with an approximation of 2.16, slightly higher than RoF. Also, the total time consumed is maximum for SMOTETomek for all the classifiers, especially for RoF.Table 5
Performance comparison between the hybrid sampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the IP dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTSMOTETomek68.39 ± 1.7768.46 ± 1.1368.37 ± 1.4645.21 ± 1.9268.49 ± 2.3816.956SMOTEENN66.16 ± 1.3567.14 ± 1.4866.31 ± 1.7246.78 ± 1.567.134 ± 2.1816.357ETSMOTETomek78.56 ± 1.280.15 ± 1.5779.09 ± 1.5159.69 ± 1.7680.09 ± 1.3415.672SMOTEENN72.55 ± 1.0474.2 ± 1.3972.44 ± 1.8452.31 ± 1.4873.96 ± 2.3115.118RFSMOTETomek79.12 ± 1.2680.55 ± 1.7179.46 ± 1.3261.37 ± 1.1780.54 ± 2.1918.171SMOTEENN72.13 ± 1.8273.36 ± 1.7271.64 ± 1.9952.67 ± 1.5573.317 ± 2.3316.613RoFSMOTETomek82.37 ± 1.1284.23 ± 1.6681.56 ± 1.1264.74 ± 1.1782.74 ± 2.164195.326SMOTEENN74.66 ± 1.5875.82 ± 1.7573.73 ± 1.7854.85 ± 1.4376.19 ± 1.733628.153RREFSMOTETomek81.71 ± 1.0281.13 ± 1.5979.93 ± 1.4462.83 ± 1.682.32 ± 1.3689.452SMOTEENN74.12 ± 1.2974.29 ± 1.8573.16 ± 1.6753.19 ± 1.5675.43 ± 1.0185.31


#### 4.3.2. For Salinas Valley Dataset

(1) Effect of Oversampling. Table 6 compares the tree-based classifier model performances due to the oversampling of the data. ADASYN achieves better results in all performance metrics for all classifiers. RREF attains the highest accuracy of 95.84%, with an approximation of 1.33, slightly higher than RoF. Also, the total time consumed is maximum for ADASYN for all the classifiers, especially for RoF.Table 6
Performance comparison between the oversampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the SV dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTROS88.51 ± 2.8689.54 ± 2.7589.59 ± 2.4642.17 ± 2.5788.78 ± 1.7427.487SMOTE89.48 ± 1.3889.49 ± 1.8790.91 ± 2.5646.63 ± 2.1789.36 ± 1.1932.258B-SMOTE89.47 ± 2.4589.39 ± 1.9589.47 ± 2.7546.22 ± 2.1189.05 ± 1.3537.898ADASYN89.64 ± 2.4389.62 ± 1.8489.67 ± 1.348.3 ± 2.0689.59 ± 1.6339.618ETROS93.36 ± 2.7193.33 ± 2.3193.32 ± 2.2260.78 ± 2.0292.05 ± 1.8451.385SMOTE93.35 ± 2.8293.29 ± 2.293.24 ± 2.162.69 ± 2.7293.11 ± 1.2252.384B-SMOTE93.36 ± 1.4193.32 ± 1.8693.34 ± 2.4561.88 ± 1.5792.67 ± 1.4764.989ADASYN93.46 ± 2.8693.35 ± 2.1393.48 ± 2.8662.92 ± 2.593.3 ± 1.1365.096RFROS93.31 ± 2.2993.26 ± 2.993.29 ± 1.1159.76 ± 2.7892.26 ± 1.2367.545SMOTE93.36 ± 1.1593.32 ± 1.4793.26 ± 2.0961.84 ± 1.8693.27 ± 1.768.773B-SMOTE93.11 ± 2.2193.6 ± 2.0293.23 ± 1.9660.44 ± 2.3193.04 ± 1.4168.56ADASYN93.48 ± 1.3793.32 ± 1.5893.31 ± 2.9962.88 ± 2.0594.64 ± 1.3668.796RoFROS94.47 ± 1.0494.55 ± 1.7894.52 ± 1.8371.79 ± 2.7794.85 ± 1.234644.89SMOTE95.43 ± 1.7295.56 ± 2.7595.27 ± 1.3572.36 ± 1.6895.48 ± 1.274889.134B-SMOTE95.48 ± 2.5995.59 ± 2.4695.25 ± 1.3172.51 ± 1.5195.18 ± 1.364755.675ADASYN95.6 ± 1.895.87 ± 1.5795.75 ± 2.8472.68 ± 2.8995.7 ± 1.865023.45RREFROS94.23 ± 2.2794.07 ± 2.6394.59 ± 2.9481.86 ± 1.4193.27 ± 1.4275.543SMOTE94.25 ± 1.1693.97 ± 2.5994.3 ± 2.7881.12 ± 1.495.57 ± 1.1887.642B-SMOTE94.47 ± 2.1892.45 ± 2.3294.21 ± 1.7980.12 ± 2.0794.25 ± 1.1389.654ADASYN95.43 ± 1.4594.83 ± 1.8594.82 ± 2.782.94 ± 1.0295.84 ± 1.3395.437(2) Effect of Undersampling. Table 7 describes the comparison between the tree-based classifier model performances due to the oversampling of the data. It is imperative that TL achieves better results in all performance metrics for all classifiers. RoF attains the highest accuracy of 95.41%, with an approximation of 1.5, which is slightly higher than RREF. Also, the total time consumed is maximum for TL for all the classifiers, especially for RoF.Table 7
Performance comparison between the undersampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the SV dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTRUS82.74 ± 2.9876.44 ± 2.577.23 ± 1.4939.94 ± 2.0976.4 ± 1.472.067Tomek89.81 ± 2.4889.42 ± 2.9189.32 ± 2.6846.75 ± 1.6579.83 ± 1.063.705NCL89.86 ± 1.9989.89 ± 2.0589.87 ± 2.7746.17 ± 1.6479.97 ± 1.192.13ENN89.3 ± 2.7588.94 ± 2.7888.98 ± 2.4845.7 ± 2.4778.93 ± 1.153.545ETRUS86.91 ± 2.4282.9 ± 1.1583.45 ± 2.1958.68 ± 2.1182.95 ± 2.693.256Tomek93 ± 2.5593.9 ± 2.5693.6 ± 1.0260.42 ± 2.1693.22 ± 1.2419.895NCL91.51 ± 2.491.45 ± 1.6291.35 ± 2.7758.67 ± 1.9391.36 ± 1.7218.444ENN90.67 ± 1.2490.46 ± 1.9990.45 ± 1.5357.58 ± 1.890.44 ± 1.3218.404RFRUS87.12 ± 1.1483.35 ± 2.7483.8 ± 1.3169.4 ± 2.4683.35 ± 1.153.244Tomek93.12 ± 2.3793.18 ± 2.6593.35 ± 1.4770.31 ± 1.9593.56 ± 1.2529.694NCL91.68 ± 2.8991.55 ± 1.5491.55 ± 1.7768.73 ± 2.0691.49 ± 2.1228.271ENN90.57 ± 1.690.43 ± 2.990.48 ± 2.467.49 ± 1.0690.41 ± 1.7327.399RoFRUS88.77 ± 1.9483.54 ± 2.2484.1 ± 2.7380.1 ± 1.5385.32 ± 1.81103.763Tomek93.44 ± 2.8394.8 ± 1.9994.92 ± 1.6581.45 ± 1.5894.41 ± 1.53219.078NCL92.26 ± 2.3493.23 ± 2.5793.37 ± 2.4280.27 ± 2.3893.68 ± 2.842964.741ENN90.29 ± 2.7392.32 ± 2.8291.7 ± 2.4979.17 ± 2.5993.54 ± 2.982895.973RREFRUS88.65 ± 1.0381.8 ± 2.1979.79 ± 1.8479.62 ± 2.0984.93 ± 219.439Tomek93.88 ± 2.3994.48 ± 2.5794.94 ± 1.3281.59 ± 2.6394.44 ± 2.3125.452NCL91.82 ± 1.5892.26 ± 2.1591.32 ± 1.4178.8 ± 2.2193.7 ± 2.621.214ENN89.88 ± 1.9890.68 ± 2.5291.94 ± 2.6579.11 ± 1.4693.18 ± 2.4120.84(3) Effect of Hybrid Sampling. Table 8 describes the comparison between the tree-based classifier model performances due to the hybrid sampling of the data. It can be inferred that SMOTETomek achieves better results in all performance metrics for all classifiers. RoF attains the highest accuracy of 94.89%, with an approximation of 2.24, which is slightly higher than RoF. Also, the total time consumed is maximum for SMOTETomek for all the classifiers, especially for RoF.Table 8
Performance comparison between the hybrid sampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the SV dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTSMOTETomek89.55 ± 2.0489.54 ± 1.6489.58 ± 1.1646.28 ± 1.8789.46 ± 2.1191.796SMOTEENN88.72 ± 2.2488.62 ± 1.5488.6 ± 2.5345.18 ± 2.7688.59 ± 1.9583.808ETSMOTETomek93.12 ± 2.6793.19 ± 1.6193.12 ± 1.2160.34 ± 2.8293.01 ± 2.35105.412SMOTEENN90.64 ± 2.3690.41 ± 1.1490.49 ± 1.7157.31 ± 1.9690.38 ± 1.8799.811RFSMOTETomek93.01 ± 2.4293.28 ± 2.993.29 ± 1.3268.35 ± 1.1592.97 ± 2.1459.343SMOTEENN90.59 ± 1.9690.31 ± 1.2590.21 ± 2.0667.27 ± 2.5190.26 ± 1.8452.498RoFSMOTETomek94.89 ± 1.3994.77 ± 1.7494.81 ± 1.5479.28 ± 1.0393.89 ± 2.246297.542SMOTEENN91.72 ± 192.12 ± 1.2691.94 ± 1.1869.11 ± 1.8191.77 ± 1.686031.47RREFSMOTETomek93.29 ± 2.8393.14 ± 2.0993.57 ± 1.2678.49 ± 2.0793.17 ± 2.12186.743SMOTEENN91.09 ± 1.1291.17 ± 1.5491.79 ± 1.4688.2 ± 1.5291.41 ± 1.48163.265


#### 4.3.3. For Pavia University Dataset

(1) Effect of Oversampling. Table 9 depicts the comparison between the tree-based classifier model performances due to the oversampling of the data. It is evident that SMOTE achieves better results in all performance metrics for all classifiers. RoF attains the highest accuracy of 91.89%, with an approximation of 1.45, which is slightly higher than RoF. Also, the total time consumed is maximum for ADASYN for all the classifiers, especially for RoF.Table 9
Performance comparison between the oversampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the PU dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTROS78.96 ± 1.9179.28 ± 2.1379.1 ± 3.3637.12 ± 2.9377.17 ± 1.8628.216SMOTE79.45 ± 2.1479.96 ± 2.6179.89 ± 1.4737.92 ± 1.2279.94 ± 1.1729.025B-SMOTE78.73 ± 3.1778.43 ± 3.0478.62 ± 3.3335.15 ± 3.5478.37 ± 1.0628.815ADASYN78.63 ± 2.2778.12 ± 3.0478.41 ± 2.5435.45 ± 1.978.57 ± 1.730.451ETROS84.79 ± 2.6485.77 ± 1.3583.58 ± 3.4443.85 ± 2.9884.67 ± 1.9556.781SMOTE84.93 ± 2.6585.86 ± 3.1583.69 ± 2.7445.9 ± 1.2685.71 ± 1.5957.864B-SMOTE84.74 ± 3.285.72 ± 1.3383.55 ± 3.8444.82 ± 2.9185.17 ± 1.8957.336ADASYN84.61 ± 1.185.69 ± 2.5183.43 ± 1.8744.27 ± 2.1285.51 ± 1.859.337RFROS84.28 ± 2.6685.26 ± 3.9583.15 ± 2.3945.24 ± 3.2884.25 ± 1.6562.336SMOTE84.56 ± 1.4185.96 ± 2.7383.8 ± 3.648.04 ± 1.3186.89 ± 1.9765.369B-SMOTE83.17 ± 3.2885.9 ± 1.4881.9 ± 1.8237.28 ± 2.4184.01 ± 1.4365.57ADASYN83.92 ± 2.9984.82 ± 2.8781.94 ± 1.1338.87 ± 3.2786.04 ± 1.8866.634RoFROS86.57 ± 1.3486.85 ± 3.4984.96 ± 2.4850.25 ± 3.3287.24 ± 1.253982.435SMOTE87.93 ± 3.6488.26 ± 3.1288.17 ± 2.2952.93 ± 1.291.89 ± 1.453543.257B-SMOTE87.52 ± 3.5688.22 ± 1.2888.03 ± 2.5543.48 ± 1.4788.55 ± 1.563421.805ADASYN87.49 ± 1.9388.1 ± 3.4688.1 ± 3.6440.16 ± 2.8390.38 ± 1.14721.63RREFROS86.59 ± 3.8286.83 ± 3.3884.99 ± 3.6550.28 ± 3.8387.24 ± 1.485.87SMOTE88.96 ± 3.3288.79 ± 1.8388.95 ± 1.4652.32 ± 1.591.98 ± 1.1687.654B-SMOTE87.54 ± 3.7488.2 ± 3.6188.09 ± 2.1743.48 ± 2.7188.53 ± 1.8384.764ADASYN87.45 ± 3.8388.19 ± 1.1888.17 ± 2.9251.24 ± 3.0790.58 ± 1.7488.453(2) Effect of Undersampling. Table 10 describes the comparison between the tree-based classifier model performances due to the oversampling of the data. It is imperative that TL achieves better results in all performance metrics for all classifiers, except for DT, where ENN attains the highest OA. RoF attains the highest accuracy of 89.91%, with an approximation of 1.34, which is slightly higher than RREF. Also, the total time consumed is maximum for TL for all the classifiers, especially for RoF.Table 10
Performance comparison between the undersampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the PU dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTRUS78.92 ± 1.1643.2 ± 1.5548.35 ± 2.915.29 ± 1.5742.96 ± 1.850.818Tomek78.76 ± 2.8179.17 ± 1.1478.99 ± 2.8836.7 ± 1.2679.13 ± 1.793.185NCL79.82 ± 1.4681.79 ± 2.4980.36 ± 1.7739.89 ± 1.8682.51 ± 2.352.588ENN79.38 ± 2.8581.53 ± 1.7179.78 ± 2.1339.82 ± 2.8681.69 ± 1.912.566ETRUS83.24 ± 2.3344.17 ± 2.0648.14 ± 2.1517.74 ± 1.1544.06 ± 2.511.806Tomek84.4 ± 2.3985.53 ± 2.6483.22 ± 2.9142.91 ± 2.1585.49 ± 1.8414.223NCL83.87 ± 1.5984.96 ± 1.9382.57 ± 1.2842.25 ± 2.8884.92 ± 2.213.34ENN82.83 ± 1.884.11 ± 1.9181.36 ± 2.9837.48 ± 1.4984.13 ± 1.8113.806RFRUS83.36 ± 2.5243.2 ± 1.5147.17 ± 1.6317.16 ± 1.7943.16 ± 2.7123.161Tomek84.19 ± 1.3185.33 ± 1.0583.12 ± 1.1743.17 ± 1.8285.29 ± 2.1728.126NCL83.75 ± 1.5584.91 ± 2.4382.7 ± 2.2342.84 ± 2.2584.97 ± 2.6727.781ENN82.81 ± 2.184.12 ± 1.6881.43 ± 1.7538.27 ± 1.5684.1 ± 2.1727.765RoFRUS85.32 ± 1.6448.46 ± 1.6649.77 ± 2.6719.87 ± 2.6747.29 ± 1.111769.731Tomek85.97 ± 2.3486.34 ± 1.4485.34 ± 2.4347.52 ± 1.3588.71 ± 1.342135.432NCL84.31 ± 2.2385.81 ± 2.2683.2 ± 1.9147.63 ± 2.5887.43 ± 2.581960.372ENN83.11 ± 1.0284.59 ± 2.8281.8 ± 2.7341.22 ± 387.11 ± 1.751904.97RREFRUS85.13 ± 1.3847.71 ± 2.6849.28 ± 2.918.85 ± 1.9646.85 ± 1.1617.298Tomek85.33 ± 1.2285.95 ± 1.6485.81 ± 2.4746.24 ± 1.0989.92 ± 2.1123.064NCL84.02 ± 1.885.49 ± 1.2983.69 ± 2.2745.87 ± 2.2687.81 ± 2.3221.873ENN82.91 ± 1.5784.8 ± 2.3882.24 ± 1.639.97 ± 2.7887.03 ± 1.8420.09(3) Effect of Hybrid Sampling. Table 11 describes the comparison between the tree-based classifier model performances due to the hybrid sampling of the data. It can be inferred that SMOTETomek achieves better results in all performance metrics for all classifiers. RREF attains the highest accuracy of 85.83%, with an approximation of 2.32, which is slightly higher than RoF. Also, the total time consumed is maximum for SMOTETomek for all the classifiers, especially for RoF.Table 11
Performance comparison between the hybrid sampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the PU dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTSMOTETomek78.77 ± 1.3278.93 ± 2.378.82 ± 2.9335.37 ± 1.1178.89 ± 2.5189.671SMOTEENN79.45 ± 2.6381.53 ± 2.8579.88 ± 2.9337.62 ± 2.0581.47 ± 2.1880.852ETSMOTETomek84.46 ± 2.7885.47 ± 1.6783.18 ± 1.1842.71 ± 1.0485.36 ± 1.3497.329SMOTEENN82.91 ± 1.2384.17 ± 2.2581.42 ± 1.8539.77 ± 1.3284.12 ± 2.4594.81RFSMOTETomek82.95 ± 2.2383.85 ± 1.6980.74 ± 1.2548.99 ± 1.683.84 ± 2.67101.411SMOTEENN82.61 ± 1.0883.73 ± 2.8880.72 ± 1.1848.68 ± 2.6683.73 ± 2.7196.546RoFSMOTETomek85.28 ± 2.3486.95 ± 2.7587.37 ± 1.9566.42 ± 2.6486.12 ± 2.145231.754SMOTEENN85.18 ± 1.6986.71 ± 2.5187.48 ± 1.5149.88 ± 2.6885.54 ± 1.074987.34RREFSMOTETomek84.79 ± 1.885.7 ± 2.786.52 ± 1.7578.13 ± 1.1485.83 ± 2.32162.864SMOTEENN84.44 ± 2.2985.27 ± 2.9785.74 ± 2.0850.49 ± 2.9385.17 ± 1.33149.063


#### 4.3.4. Comprehensive Discussion

The total number of land cover pixels in each band of the IP, SV, and PU datasets is 10249, 54129, and 42776, respectively. Also, SV represents a valley scene, whereas the others represent urban sites. From the tables above, certain inferences can be drawn. As an oversampling technique, SMOTE stands out to be best for IP and PU datasets, but for SV, ADASYN produces the best result throughout all classifiers. SMOTE and ADASYN achieve better outcomes for all the datasets than other oversampling methods. Figure4 depicts the graphical comparison of the performances of SMOTE and ADASYN in terms of OA%. TL is the best technique for achieving good results for the HS datasets for the undersampling approach. The statistics for NCL have been closer to the outcomes of TL, although it has outperformed TL with DT classifier for all the datasets. Figure 5 represents the performance comparison between TL and NCL based on OA%. SMOTETomek has surpassed SMOTEENN in all aspects of performance for all the datasets.Figure 4
OA% comparison between SMOTE and ADASYN associated with the tree-based ensemble classifiers for IP, SV, and PU datasets.Figure 5
OA% comparison between TL and NCL associated with the tree-based ensemble classifiers for IP, SV, and PU datasets.Figures6–8 represent all EM data plotted in graphs to understand better the effects of resampling techniques on the HS datasets, viz. IP, SV, and PU. The blue, red, and green curves represent the oversampling, undersampling, and hybrid sampling technique that produces a better result than other resampling techniques. We can infer the more appropriate strategy for further research from these graphical illustrations. Figures 6(a)–6(e) show that the PEMs, viz. precision, recall, F_score, kappa, and OA of the oversampling techniques with the classifier RREF, are the highest for the IP dataset, whereas DT is the least impactful. For hybrid sampling, RoF achieves the best overall PEM scores. The SV dataset obtains the best outcome in oversampling and RREF, whereas there is only a little difference between the performance measures, statistically, that dwells between RoF and RREF. The same scenario applies to the PU dataset in terms of PEMs, as shown in Figures 7(a)–7(e). For the IP dataset, represented by Figures 8(a)–8(e), with the lowest dimension containing less spectral resolutions, RREF performs best for oversampling and undersampling, but RoF stands out in hybrid sampling. The other two datasets, SV and PU, have higher dimensions enriched with more differentiative spectral features. When they undergo undersampling or hybrid sampling, RoF makes the most corrective decisions. These figures conclude that DT, a simple and basic tree-based ensemble classifier, produces the least accuracy for all datasets. However, RREF is an ensemble of two efficient and state-of-art tree-based ensemble classifiers. It generates maximum OA for all datasets associated with the oversampling techniques, SMOTE and ADASYN, and the undersampling technique, TL. However, hybrid sampling is found to be more compatible with RoF.Figure 6
Comparison of the PEM for oversampling, undersampling, and hybrid sampling applied on the IP dataset. (a) Prec_score%. (b) Rec_score%. (c)F_score%. (d) Kappa_score%. (e) OA%.
(a)(b)(c)(d)(e)Figure 7
Comparison of the PEM for oversampling, undersampling, and hybrid sampling applied on the SV dataset. (a) Prec_score%. (b) Rec_score%. (c)F_score%. (d) Kappa_score%. (e) OA%.
(a)(b)(c)(d)(e)Figure 8
Comparison of the PEM for oversampling, undersampling, and hybrid sampling applied on the PU dataset: (a) Prec_score%. (b) Rec_score%. (c)F_score%. (d) Kappa_score%. (e) OA%.
(a)(b)(c)(d)(e)The calculation and comparison of elapsed time for executing the entire training system, i.e., the time complexity, also play a vital role. This comparison is graphically illustrated in Figure9 as a 3D bar chart. The figure shows that hybrid sampling is the amalgamation of an oversampler, and an undersampler holds a more complex structure and takes the highest time to build the model. Then come the oversampling techniques that generate synthetic samples to recreate the balanced dataset, which takes a certain amount of time. Finally, the order is followed by undersampling strategies whose elapsed time is least due to the deletion of linked neighborhood data samples. This order is thoroughly followed irrespective of the type of the applied tree-based ensemble classifier.Figure 9
Comparison of maximum TE (in secs) for the oversampling, undersampling, and hybrid sampling techniques taken for each of the classifiers applied on IP, SV, and PU datasets.The comparison between the elapsed time with units in seconds is also inevitable for the different ensemble tree-based classifiers we used in our work. The order of increment in time of execution for those classifier models is consistent: DT < ET < RF < RREF << RoF. According to the previous discussion, RREF and RoF provide the best outcomes for all the resampling strategies. The time taken by RoF is at most 136.85 times (undersampling in IP) and at least 32.12 times (hybrid sampling in PU) higher than RREF. The other TE (in secs) ratios for RREF and RoF, as shown in Figure9, lie within the said range.The entire study summarizes that oversampling strategies are more compatible with hyperspectral images as they are more consistent than undersampling and hybrid sampling strategies. Oversampling provides the creation of new synthetic instances that inevitably regenerate the existing dataset and bring in a balance between the samples of major and minor classes. Due to the overpopulation of the samples, the dataset does not suffer from the lack of labeled data, and no feature or information is lost, which is an issue in undersampling. The fully balanced dataset is then fed to the tree-based ensemble classifier models as input. The decision trees are made in equilibrium with the balanced samples and produce elementary decisions. Those decision outcomes are passed into forests, and the averaged classification result is ultimately obtained. However, from Tables2, 5, and 8, we found that SMOTE is mostly better than ADASYN when the ratio of class imbalance is high. This is due to the SMOTE-augmented minority class overall anticipated value being the same as the original minority class expected value, but its variance is lower. As a result, SMOTE has little effect on classifiers that use mean values and total variances to determine categorization rules. ADASYN is also helpful in reducing the learning bias caused by the data distribution of the original imbalanced dataset. The disadvantage of ADASYN over SMOTE is that the procedure is more complex and time-consuming due to its adaptive nature. Additionally, the contrasts are found to be minor between the PEMs derived by RREF and RoF as tree-based ensemble classifier models with each of the oversampling, undersampling, and hybrid sampling procedures. Finally, we can say that the classifier RREF, in combination with the oversampling algorithms such as SMOTE and ADASYN, is capable of producing outstanding classification results for balanced hyperspectral datasets.


## 4.1. Experimental Setup

All program codes are implemented using Python language with its latest versions of embedded packages, such as Keras, TensorFlow, and scikit. The hardware specifications are Intel® Core™ i5-10300H Processor, 2.5 GHz, 8 GB DDR4 2933 MHz RAM, and 4 GB NVIDIA GeForce GTX 1650 Ti. After splitting the original dataset into train and test sets, we (1) apply the resampling techniques, viz. 4 oversampling, 4 undersampling, and 2 hybrid sampling strategies to our datasets individually; (2) train each of the tree-based ensemble classifier models with each resampling method; (3) obtain the classification performance using the assessment metrics; and (4) present a detailed comparative analysis based on the obtained metric statistics. We have uniformly overpopulated the selected minor class samples and removed neighborly linked major class samples to balance the individual dataset. The same strategy is used in combination for the hybrid sampling. The hyperparameter setting for the classifiers is as follows:(1)
For DT, ET, RF, and RREF, we have used the Gini criterion with a maximum tree depth of 100 and the number of estimators as 1000, keeping the other hyperparameters as default.(2)
For RoF, we have taken 1000 number of trees and a total of 20 features, keeping the rest as default.


## 4.2. Performance Evaluation Metrics (PEM)

In this work, we have adopted five prime metrics to assess our model’s performance: precision, recall,F score, Cohen kappa, overall accuracy, and the time elapsed to execute the entire process. These are described as follows.Let us denoteY=the total number of class labels in the dataset, bii = true prediction of ith class, bji = false prediction of ith class, and bij = false prediction of ith class into jth class.(1) Precision Score. Precision is used to assess each class classification accuracy in the imbalanced data. The precision score is expected to be high for a better classifier. The precision score (Prec_score%) measures the testing prediction rate of all samples and is defined in the following equation:(8)Prec_Score%=1Ybii∑i=1Ybji×100.(2) Recall Score. Recall or true-positive rate is the percentage of correctly classified events. The recall is especially well suited to assessing classification systems dealing with many skewed data classes. The large recall value indicates the better performance of a classifier. The Rec_score% is given by the following equation:(9)Rec_Score%=1Y∑i=1Ybii∑i=1Ybij×100.(3) F_Score. In the classification of imbalanced data, the F-measure, an assessment index derived by combining precision and recall, has been widely employed. The introduction of F-measure combines the two, and the greater the F-measure, the better the classifier’s performance. The computation of F_score% is given as follows:(10)F_Score%=2Y∑i=1YRi⋅∑i=1YPi∑i=1YRi+∑i=1YPi×100,where Ri and Pi denote the precision and recall of class i, respectively.(4) Cohen_Kappa_Score. Cohen kappa is a statistic that evaluates the predictability of the findings and determines whether the consistency is genuinely random. The greater the Cohen_kappa, the better the classifier’s performance. Kappa_score% is equated as follows:(11)Kappa_Score%=Overall Accuracy−∑i=1Yqi⋅qi′1−∑i=1Yqi⋅qi′×100,where qi and qi′ denote the original and predicted sample sizes of class i, respectively.(5) Overall Accuracy. Overall accuracy, being a performance-metric, assigns the similar weight to every of the data types, regardless of their number of instances. The definition of OA is given as follows:(12)OA%=1Y∑i=1Ybii∑i=1Ybji+bii×100.(6) Time Elapsed. Time complexity is a factor in real-time computation. Lesser the time complexity, the higher the quality of the classifier. Time elapsed for execution is defined as follows:(13)TEin seconds=End time of execution–Start time of execution.


## 4.3. Comparative Performance Analysis of the Model

### 4.3.1. For Indian Pines Dataset

(1) Effect of Oversampling. Table 3 describes the comparison between the tree-based classifier model performances due to the oversampling of the data. It is evident that SMOTE achieves better results in all performance metrics for all classifiers. RREF attains the highest accuracy of 89.49%, with an approximation of 1.32, slightly higher than RoF. Also, the total time consumed is maximum for ADASYN for all the classifiers, especially for RoF.Table 3
Performance comparison between the oversampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall,F score, kappa, and OA and TE calculated in seconds for the IP dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTROS68.41 ± 1.867.13 ± 2.1867.47 ± 2.6144.62 ± 1.4767.06 ± 1.743.516SMOTE69.5 ± 2.4968.77 ± 2.8768.84 ± 2.9545.92 ± 1.468.68 ± 1.934.629B-SMOTE68.37 ± 1.667.51 ± 2.0968.14 ± 2.1945.89 ± 2.2168.42 ± 1.836.495ADASYN68.48 ± 2.6567.74 ± 1.5668.19 ± 2.3545.41 ± 2.4668.53 ± 1.387.895ETROS79.25 ± 2.1280.61 ± 1.2679.56 ± 1.3960.43 ± 1.1480.57 ± 1.246.439SMOTE79.98 ± 2.6881.25 ± 2.8580.24 ± 2.1362.3 ± 1.0882.28 ± 1.767.867B-SMOTE79.57 ± 1.5881.16 ± 2.6179.95 ± 3.0260.76 ± 2.1981.99 ± 1.259.137ADASYN79.89 ± 2.2880.93 ± 2.9480.18 ± 1.4462.21 ± 2.3182.08 ± 1.099.248RFROS80.13 ± 1.1281.15 ± 2.5580.54 ± 1.2871.8 ± 2.2783.54 ± 1.896.256SMOTE88.96 ± 1.1281.72 ± 1.7980.95 ± 1.1572.98 ± 1.3284.72 ± 1.128.282B-SMOTE89.35 ± 1.7680.91 ± 1.779.82 ± 2.5161.86 ± 1.3783.07 ± 1.210.056ADASYN89.87 ± 1.6381.33 ± 1.6780.26 ± 2.3472.05 ± 2.7483.87 ± 1.7810.01RoFROS84.32 ± 1.1284.45 ± 1.1184.5 ± 1.3777.28 ± 1.8785.15 ± 1.073274.945SMOTE89.5 ± 2.0789.53 ± 1.0189.37 ± 1.0681.34 ± 2.2588.99 ± 1.853645.765B-SMOTE88.16 ± 1.6586.67 ± 2.737.39 ± 1.4279.84 ± 2.487.65 ± 1.733958.983ADASYN88.93 ± 2.6188.56 ± 2.9589.11 ± 2.4780.37 ± 2.9588.46 ± 1.683979.156RREFROS86.36 ± 1.3187.92 ± 1.2685.75 ± 2.5779.84 ± 2.184.94 ± 1.0943.875SMOTE89.71 ± 2.4690.15 ± 2.7691.21 ± 1.183.48 ± 1.7389.49 ± 1.3256.953B-SMOTE88.73 ± 2.9288.94 ± 2.189.44 ± 2.9479.8 ± 1.7888.47 ± 1.9455.326ADASYN89.56 ± 2.289.85 ± 2.7290.37 ± 1.0280.36 ± 2.3289.08 ± 1.5361.578(2) Effect of Undersampling. Table 4 describes the comparison between the tree-based classifier model performances due to the oversampling of the data. It is imperative that TL achieves better results in all performance metrics for all classifiers, except for DT, where NCL attains the highest OA. RREF attains the highest accuracy of 85.32%, with an approximation of 2.76, which is slightly higher than RoF. Also, the total time consumed is maximum for TL for all the classifiers, especially for RoF.Table 4
Performance comparison between the undersampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the IP dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTRUS53.16 ± 1.0727.3 ± 1.3526.27 ± 1.723.92 ± 1.6827.35 ± 1.50.045Tomek68.59 ± 1.0968.44 ± 1.6668.46 ± 1.6944.14 ± 1.4568.42 ± 1.582.93NCL68.44 ± 1.3574.74 ± 1.669.9 ± 1.4644.68 ± 1.4669.98 ± 1.042.079ENN66.34 ± 1.367.51 ± 1.2266.57 ± 1.5743.46 ± 1.2467.52 ± 2.211.16ETRUS65.37 ± 1.6638.29 ± 1.2837.95 ± 1.0938.95 ± 1.7538.19 ± 2.830.216Tomek78.32 ± 1.1180.42 ± 1.1578.89 ± 1.3658.91 ± 1.5379.95 ± 2.63.734NCL75.17 ± 1.4676.65 ± 1.3975.28 ± 1.2354.61 ± 1.9576.6 ± 2.592.406ENN72.3 ± 1.3773.76 ± 1.2972.24 ± 1.8251.44 ± 1.4173.75 ± 2.311.248RFRUS64.84 ± 1.5634.15 ± 1.2732.23 ± 1.0947.22 ± 1.7634.06 ± 1.030.214Tomek79.4 ± 1.7380.69 ± 1.3679.46 ± 1.1561.25 ± 1.3880.6 ± 1.584.297NCL75.68 ± 1.0477.1 ± 1.175.68 ± 1.4356.29 ± 176.96 ± 2.723.557ENN71.36 ± 1.3772.84 ± 1.4171.14 ± 1.6351.55 ± 1.9572.77 ± 2.540.515RoFRUS67.87 ± 1.2637.61 ± 1.1338.62 ± 1.4149.5 ± 1.3540.84 ± 1.96957.643Tomek80.5 ± 1.3482.14 ± 1.3880.31 ± 1.4976.35 ± 1.1984.83 ± 2.081267.89NCL74.33 ± 1.5874.89 ± 1.1574.29 ± 1.4563.44 ± 1.479.25 ± 2.771043.895ENN73.77 ± 1.3172.61 ± 1.1669.53 ± 1.159.83 ± 1.5474.12 ± 1.68996.054RREFRUS69.11 ± 1.5538.17 ± 1.4639.21 ± 1.1456.3 ± 1.0444.37 ± 2.415.946Tomek82.47 ± 1.2482.61 ± 1.4780.48 ± 1.3778.58 ± 1.6385.32 ± 2.769.279NCL75.47 ± 1.2375.97 ± 1.1972.13 ± 1.6662.1 ± 1.2779.85 ± 1.156.789ENN73.58 ± 1.6271.51 ± 1.7569.88 ± 1.2860.62 ± 175.31 ± 2.096.241(3) Effect of Hybrid Sampling. Table 5 compares the tree-based classifier model performances due to the hybrid sampling of the data. It can be inferred that SMOTETomek achieves better results in all performance metrics for all classifiers. RoF attains the highest accuracy of 82.74%, with an approximation of 2.16, slightly higher than RoF. Also, the total time consumed is maximum for SMOTETomek for all the classifiers, especially for RoF.Table 5
Performance comparison between the hybrid sampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the IP dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTSMOTETomek68.39 ± 1.7768.46 ± 1.1368.37 ± 1.4645.21 ± 1.9268.49 ± 2.3816.956SMOTEENN66.16 ± 1.3567.14 ± 1.4866.31 ± 1.7246.78 ± 1.567.134 ± 2.1816.357ETSMOTETomek78.56 ± 1.280.15 ± 1.5779.09 ± 1.5159.69 ± 1.7680.09 ± 1.3415.672SMOTEENN72.55 ± 1.0474.2 ± 1.3972.44 ± 1.8452.31 ± 1.4873.96 ± 2.3115.118RFSMOTETomek79.12 ± 1.2680.55 ± 1.7179.46 ± 1.3261.37 ± 1.1780.54 ± 2.1918.171SMOTEENN72.13 ± 1.8273.36 ± 1.7271.64 ± 1.9952.67 ± 1.5573.317 ± 2.3316.613RoFSMOTETomek82.37 ± 1.1284.23 ± 1.6681.56 ± 1.1264.74 ± 1.1782.74 ± 2.164195.326SMOTEENN74.66 ± 1.5875.82 ± 1.7573.73 ± 1.7854.85 ± 1.4376.19 ± 1.733628.153RREFSMOTETomek81.71 ± 1.0281.13 ± 1.5979.93 ± 1.4462.83 ± 1.682.32 ± 1.3689.452SMOTEENN74.12 ± 1.2974.29 ± 1.8573.16 ± 1.6753.19 ± 1.5675.43 ± 1.0185.31


### 4.3.2. For Salinas Valley Dataset

(1) Effect of Oversampling. Table 6 compares the tree-based classifier model performances due to the oversampling of the data. ADASYN achieves better results in all performance metrics for all classifiers. RREF attains the highest accuracy of 95.84%, with an approximation of 1.33, slightly higher than RoF. Also, the total time consumed is maximum for ADASYN for all the classifiers, especially for RoF.Table 6
Performance comparison between the oversampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the SV dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTROS88.51 ± 2.8689.54 ± 2.7589.59 ± 2.4642.17 ± 2.5788.78 ± 1.7427.487SMOTE89.48 ± 1.3889.49 ± 1.8790.91 ± 2.5646.63 ± 2.1789.36 ± 1.1932.258B-SMOTE89.47 ± 2.4589.39 ± 1.9589.47 ± 2.7546.22 ± 2.1189.05 ± 1.3537.898ADASYN89.64 ± 2.4389.62 ± 1.8489.67 ± 1.348.3 ± 2.0689.59 ± 1.6339.618ETROS93.36 ± 2.7193.33 ± 2.3193.32 ± 2.2260.78 ± 2.0292.05 ± 1.8451.385SMOTE93.35 ± 2.8293.29 ± 2.293.24 ± 2.162.69 ± 2.7293.11 ± 1.2252.384B-SMOTE93.36 ± 1.4193.32 ± 1.8693.34 ± 2.4561.88 ± 1.5792.67 ± 1.4764.989ADASYN93.46 ± 2.8693.35 ± 2.1393.48 ± 2.8662.92 ± 2.593.3 ± 1.1365.096RFROS93.31 ± 2.2993.26 ± 2.993.29 ± 1.1159.76 ± 2.7892.26 ± 1.2367.545SMOTE93.36 ± 1.1593.32 ± 1.4793.26 ± 2.0961.84 ± 1.8693.27 ± 1.768.773B-SMOTE93.11 ± 2.2193.6 ± 2.0293.23 ± 1.9660.44 ± 2.3193.04 ± 1.4168.56ADASYN93.48 ± 1.3793.32 ± 1.5893.31 ± 2.9962.88 ± 2.0594.64 ± 1.3668.796RoFROS94.47 ± 1.0494.55 ± 1.7894.52 ± 1.8371.79 ± 2.7794.85 ± 1.234644.89SMOTE95.43 ± 1.7295.56 ± 2.7595.27 ± 1.3572.36 ± 1.6895.48 ± 1.274889.134B-SMOTE95.48 ± 2.5995.59 ± 2.4695.25 ± 1.3172.51 ± 1.5195.18 ± 1.364755.675ADASYN95.6 ± 1.895.87 ± 1.5795.75 ± 2.8472.68 ± 2.8995.7 ± 1.865023.45RREFROS94.23 ± 2.2794.07 ± 2.6394.59 ± 2.9481.86 ± 1.4193.27 ± 1.4275.543SMOTE94.25 ± 1.1693.97 ± 2.5994.3 ± 2.7881.12 ± 1.495.57 ± 1.1887.642B-SMOTE94.47 ± 2.1892.45 ± 2.3294.21 ± 1.7980.12 ± 2.0794.25 ± 1.1389.654ADASYN95.43 ± 1.4594.83 ± 1.8594.82 ± 2.782.94 ± 1.0295.84 ± 1.3395.437(2) Effect of Undersampling. Table 7 describes the comparison between the tree-based classifier model performances due to the oversampling of the data. It is imperative that TL achieves better results in all performance metrics for all classifiers. RoF attains the highest accuracy of 95.41%, with an approximation of 1.5, which is slightly higher than RREF. Also, the total time consumed is maximum for TL for all the classifiers, especially for RoF.Table 7
Performance comparison between the undersampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the SV dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTRUS82.74 ± 2.9876.44 ± 2.577.23 ± 1.4939.94 ± 2.0976.4 ± 1.472.067Tomek89.81 ± 2.4889.42 ± 2.9189.32 ± 2.6846.75 ± 1.6579.83 ± 1.063.705NCL89.86 ± 1.9989.89 ± 2.0589.87 ± 2.7746.17 ± 1.6479.97 ± 1.192.13ENN89.3 ± 2.7588.94 ± 2.7888.98 ± 2.4845.7 ± 2.4778.93 ± 1.153.545ETRUS86.91 ± 2.4282.9 ± 1.1583.45 ± 2.1958.68 ± 2.1182.95 ± 2.693.256Tomek93 ± 2.5593.9 ± 2.5693.6 ± 1.0260.42 ± 2.1693.22 ± 1.2419.895NCL91.51 ± 2.491.45 ± 1.6291.35 ± 2.7758.67 ± 1.9391.36 ± 1.7218.444ENN90.67 ± 1.2490.46 ± 1.9990.45 ± 1.5357.58 ± 1.890.44 ± 1.3218.404RFRUS87.12 ± 1.1483.35 ± 2.7483.8 ± 1.3169.4 ± 2.4683.35 ± 1.153.244Tomek93.12 ± 2.3793.18 ± 2.6593.35 ± 1.4770.31 ± 1.9593.56 ± 1.2529.694NCL91.68 ± 2.8991.55 ± 1.5491.55 ± 1.7768.73 ± 2.0691.49 ± 2.1228.271ENN90.57 ± 1.690.43 ± 2.990.48 ± 2.467.49 ± 1.0690.41 ± 1.7327.399RoFRUS88.77 ± 1.9483.54 ± 2.2484.1 ± 2.7380.1 ± 1.5385.32 ± 1.81103.763Tomek93.44 ± 2.8394.8 ± 1.9994.92 ± 1.6581.45 ± 1.5894.41 ± 1.53219.078NCL92.26 ± 2.3493.23 ± 2.5793.37 ± 2.4280.27 ± 2.3893.68 ± 2.842964.741ENN90.29 ± 2.7392.32 ± 2.8291.7 ± 2.4979.17 ± 2.5993.54 ± 2.982895.973RREFRUS88.65 ± 1.0381.8 ± 2.1979.79 ± 1.8479.62 ± 2.0984.93 ± 219.439Tomek93.88 ± 2.3994.48 ± 2.5794.94 ± 1.3281.59 ± 2.6394.44 ± 2.3125.452NCL91.82 ± 1.5892.26 ± 2.1591.32 ± 1.4178.8 ± 2.2193.7 ± 2.621.214ENN89.88 ± 1.9890.68 ± 2.5291.94 ± 2.6579.11 ± 1.4693.18 ± 2.4120.84(3) Effect of Hybrid Sampling. Table 8 describes the comparison between the tree-based classifier model performances due to the hybrid sampling of the data. It can be inferred that SMOTETomek achieves better results in all performance metrics for all classifiers. RoF attains the highest accuracy of 94.89%, with an approximation of 2.24, which is slightly higher than RoF. Also, the total time consumed is maximum for SMOTETomek for all the classifiers, especially for RoF.Table 8
Performance comparison between the hybrid sampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the SV dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTSMOTETomek89.55 ± 2.0489.54 ± 1.6489.58 ± 1.1646.28 ± 1.8789.46 ± 2.1191.796SMOTEENN88.72 ± 2.2488.62 ± 1.5488.6 ± 2.5345.18 ± 2.7688.59 ± 1.9583.808ETSMOTETomek93.12 ± 2.6793.19 ± 1.6193.12 ± 1.2160.34 ± 2.8293.01 ± 2.35105.412SMOTEENN90.64 ± 2.3690.41 ± 1.1490.49 ± 1.7157.31 ± 1.9690.38 ± 1.8799.811RFSMOTETomek93.01 ± 2.4293.28 ± 2.993.29 ± 1.3268.35 ± 1.1592.97 ± 2.1459.343SMOTEENN90.59 ± 1.9690.31 ± 1.2590.21 ± 2.0667.27 ± 2.5190.26 ± 1.8452.498RoFSMOTETomek94.89 ± 1.3994.77 ± 1.7494.81 ± 1.5479.28 ± 1.0393.89 ± 2.246297.542SMOTEENN91.72 ± 192.12 ± 1.2691.94 ± 1.1869.11 ± 1.8191.77 ± 1.686031.47RREFSMOTETomek93.29 ± 2.8393.14 ± 2.0993.57 ± 1.2678.49 ± 2.0793.17 ± 2.12186.743SMOTEENN91.09 ± 1.1291.17 ± 1.5491.79 ± 1.4688.2 ± 1.5291.41 ± 1.48163.265


### 4.3.3. For Pavia University Dataset

(1) Effect of Oversampling. Table 9 depicts the comparison between the tree-based classifier model performances due to the oversampling of the data. It is evident that SMOTE achieves better results in all performance metrics for all classifiers. RoF attains the highest accuracy of 91.89%, with an approximation of 1.45, which is slightly higher than RoF. Also, the total time consumed is maximum for ADASYN for all the classifiers, especially for RoF.Table 9
Performance comparison between the oversampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the PU dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTROS78.96 ± 1.9179.28 ± 2.1379.1 ± 3.3637.12 ± 2.9377.17 ± 1.8628.216SMOTE79.45 ± 2.1479.96 ± 2.6179.89 ± 1.4737.92 ± 1.2279.94 ± 1.1729.025B-SMOTE78.73 ± 3.1778.43 ± 3.0478.62 ± 3.3335.15 ± 3.5478.37 ± 1.0628.815ADASYN78.63 ± 2.2778.12 ± 3.0478.41 ± 2.5435.45 ± 1.978.57 ± 1.730.451ETROS84.79 ± 2.6485.77 ± 1.3583.58 ± 3.4443.85 ± 2.9884.67 ± 1.9556.781SMOTE84.93 ± 2.6585.86 ± 3.1583.69 ± 2.7445.9 ± 1.2685.71 ± 1.5957.864B-SMOTE84.74 ± 3.285.72 ± 1.3383.55 ± 3.8444.82 ± 2.9185.17 ± 1.8957.336ADASYN84.61 ± 1.185.69 ± 2.5183.43 ± 1.8744.27 ± 2.1285.51 ± 1.859.337RFROS84.28 ± 2.6685.26 ± 3.9583.15 ± 2.3945.24 ± 3.2884.25 ± 1.6562.336SMOTE84.56 ± 1.4185.96 ± 2.7383.8 ± 3.648.04 ± 1.3186.89 ± 1.9765.369B-SMOTE83.17 ± 3.2885.9 ± 1.4881.9 ± 1.8237.28 ± 2.4184.01 ± 1.4365.57ADASYN83.92 ± 2.9984.82 ± 2.8781.94 ± 1.1338.87 ± 3.2786.04 ± 1.8866.634RoFROS86.57 ± 1.3486.85 ± 3.4984.96 ± 2.4850.25 ± 3.3287.24 ± 1.253982.435SMOTE87.93 ± 3.6488.26 ± 3.1288.17 ± 2.2952.93 ± 1.291.89 ± 1.453543.257B-SMOTE87.52 ± 3.5688.22 ± 1.2888.03 ± 2.5543.48 ± 1.4788.55 ± 1.563421.805ADASYN87.49 ± 1.9388.1 ± 3.4688.1 ± 3.6440.16 ± 2.8390.38 ± 1.14721.63RREFROS86.59 ± 3.8286.83 ± 3.3884.99 ± 3.6550.28 ± 3.8387.24 ± 1.485.87SMOTE88.96 ± 3.3288.79 ± 1.8388.95 ± 1.4652.32 ± 1.591.98 ± 1.1687.654B-SMOTE87.54 ± 3.7488.2 ± 3.6188.09 ± 2.1743.48 ± 2.7188.53 ± 1.8384.764ADASYN87.45 ± 3.8388.19 ± 1.1888.17 ± 2.9251.24 ± 3.0790.58 ± 1.7488.453(2) Effect of Undersampling. Table 10 describes the comparison between the tree-based classifier model performances due to the oversampling of the data. It is imperative that TL achieves better results in all performance metrics for all classifiers, except for DT, where ENN attains the highest OA. RoF attains the highest accuracy of 89.91%, with an approximation of 1.34, which is slightly higher than RREF. Also, the total time consumed is maximum for TL for all the classifiers, especially for RoF.Table 10
Performance comparison between the undersampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the PU dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTRUS78.92 ± 1.1643.2 ± 1.5548.35 ± 2.915.29 ± 1.5742.96 ± 1.850.818Tomek78.76 ± 2.8179.17 ± 1.1478.99 ± 2.8836.7 ± 1.2679.13 ± 1.793.185NCL79.82 ± 1.4681.79 ± 2.4980.36 ± 1.7739.89 ± 1.8682.51 ± 2.352.588ENN79.38 ± 2.8581.53 ± 1.7179.78 ± 2.1339.82 ± 2.8681.69 ± 1.912.566ETRUS83.24 ± 2.3344.17 ± 2.0648.14 ± 2.1517.74 ± 1.1544.06 ± 2.511.806Tomek84.4 ± 2.3985.53 ± 2.6483.22 ± 2.9142.91 ± 2.1585.49 ± 1.8414.223NCL83.87 ± 1.5984.96 ± 1.9382.57 ± 1.2842.25 ± 2.8884.92 ± 2.213.34ENN82.83 ± 1.884.11 ± 1.9181.36 ± 2.9837.48 ± 1.4984.13 ± 1.8113.806RFRUS83.36 ± 2.5243.2 ± 1.5147.17 ± 1.6317.16 ± 1.7943.16 ± 2.7123.161Tomek84.19 ± 1.3185.33 ± 1.0583.12 ± 1.1743.17 ± 1.8285.29 ± 2.1728.126NCL83.75 ± 1.5584.91 ± 2.4382.7 ± 2.2342.84 ± 2.2584.97 ± 2.6727.781ENN82.81 ± 2.184.12 ± 1.6881.43 ± 1.7538.27 ± 1.5684.1 ± 2.1727.765RoFRUS85.32 ± 1.6448.46 ± 1.6649.77 ± 2.6719.87 ± 2.6747.29 ± 1.111769.731Tomek85.97 ± 2.3486.34 ± 1.4485.34 ± 2.4347.52 ± 1.3588.71 ± 1.342135.432NCL84.31 ± 2.2385.81 ± 2.2683.2 ± 1.9147.63 ± 2.5887.43 ± 2.581960.372ENN83.11 ± 1.0284.59 ± 2.8281.8 ± 2.7341.22 ± 387.11 ± 1.751904.97RREFRUS85.13 ± 1.3847.71 ± 2.6849.28 ± 2.918.85 ± 1.9646.85 ± 1.1617.298Tomek85.33 ± 1.2285.95 ± 1.6485.81 ± 2.4746.24 ± 1.0989.92 ± 2.1123.064NCL84.02 ± 1.885.49 ± 1.2983.69 ± 2.2745.87 ± 2.2687.81 ± 2.3221.873ENN82.91 ± 1.5784.8 ± 2.3882.24 ± 1.639.97 ± 2.7887.03 ± 1.8420.09(3) Effect of Hybrid Sampling. Table 11 describes the comparison between the tree-based classifier model performances due to the hybrid sampling of the data. It can be inferred that SMOTETomek achieves better results in all performance metrics for all classifiers. RREF attains the highest accuracy of 85.83%, with an approximation of 2.32, which is slightly higher than RoF. Also, the total time consumed is maximum for SMOTETomek for all the classifiers, especially for RoF.Table 11
Performance comparison between the hybrid sampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the PU dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTSMOTETomek78.77 ± 1.3278.93 ± 2.378.82 ± 2.9335.37 ± 1.1178.89 ± 2.5189.671SMOTEENN79.45 ± 2.6381.53 ± 2.8579.88 ± 2.9337.62 ± 2.0581.47 ± 2.1880.852ETSMOTETomek84.46 ± 2.7885.47 ± 1.6783.18 ± 1.1842.71 ± 1.0485.36 ± 1.3497.329SMOTEENN82.91 ± 1.2384.17 ± 2.2581.42 ± 1.8539.77 ± 1.3284.12 ± 2.4594.81RFSMOTETomek82.95 ± 2.2383.85 ± 1.6980.74 ± 1.2548.99 ± 1.683.84 ± 2.67101.411SMOTEENN82.61 ± 1.0883.73 ± 2.8880.72 ± 1.1848.68 ± 2.6683.73 ± 2.7196.546RoFSMOTETomek85.28 ± 2.3486.95 ± 2.7587.37 ± 1.9566.42 ± 2.6486.12 ± 2.145231.754SMOTEENN85.18 ± 1.6986.71 ± 2.5187.48 ± 1.5149.88 ± 2.6885.54 ± 1.074987.34RREFSMOTETomek84.79 ± 1.885.7 ± 2.786.52 ± 1.7578.13 ± 1.1485.83 ± 2.32162.864SMOTEENN84.44 ± 2.2985.27 ± 2.9785.74 ± 2.0850.49 ± 2.9385.17 ± 1.33149.063


### 4.3.4. Comprehensive Discussion

The total number of land cover pixels in each band of the IP, SV, and PU datasets is 10249, 54129, and 42776, respectively. Also, SV represents a valley scene, whereas the others represent urban sites. From the tables above, certain inferences can be drawn. As an oversampling technique, SMOTE stands out to be best for IP and PU datasets, but for SV, ADASYN produces the best result throughout all classifiers. SMOTE and ADASYN achieve better outcomes for all the datasets than other oversampling methods. Figure4 depicts the graphical comparison of the performances of SMOTE and ADASYN in terms of OA%. TL is the best technique for achieving good results for the HS datasets for the undersampling approach. The statistics for NCL have been closer to the outcomes of TL, although it has outperformed TL with DT classifier for all the datasets. Figure 5 represents the performance comparison between TL and NCL based on OA%. SMOTETomek has surpassed SMOTEENN in all aspects of performance for all the datasets.Figure 4
OA% comparison between SMOTE and ADASYN associated with the tree-based ensemble classifiers for IP, SV, and PU datasets.Figure 5
OA% comparison between TL and NCL associated with the tree-based ensemble classifiers for IP, SV, and PU datasets.Figures6–8 represent all EM data plotted in graphs to understand better the effects of resampling techniques on the HS datasets, viz. IP, SV, and PU. The blue, red, and green curves represent the oversampling, undersampling, and hybrid sampling technique that produces a better result than other resampling techniques. We can infer the more appropriate strategy for further research from these graphical illustrations. Figures 6(a)–6(e) show that the PEMs, viz. precision, recall, F_score, kappa, and OA of the oversampling techniques with the classifier RREF, are the highest for the IP dataset, whereas DT is the least impactful. For hybrid sampling, RoF achieves the best overall PEM scores. The SV dataset obtains the best outcome in oversampling and RREF, whereas there is only a little difference between the performance measures, statistically, that dwells between RoF and RREF. The same scenario applies to the PU dataset in terms of PEMs, as shown in Figures 7(a)–7(e). For the IP dataset, represented by Figures 8(a)–8(e), with the lowest dimension containing less spectral resolutions, RREF performs best for oversampling and undersampling, but RoF stands out in hybrid sampling. The other two datasets, SV and PU, have higher dimensions enriched with more differentiative spectral features. When they undergo undersampling or hybrid sampling, RoF makes the most corrective decisions. These figures conclude that DT, a simple and basic tree-based ensemble classifier, produces the least accuracy for all datasets. However, RREF is an ensemble of two efficient and state-of-art tree-based ensemble classifiers. It generates maximum OA for all datasets associated with the oversampling techniques, SMOTE and ADASYN, and the undersampling technique, TL. However, hybrid sampling is found to be more compatible with RoF.Figure 6
Comparison of the PEM for oversampling, undersampling, and hybrid sampling applied on the IP dataset. (a) Prec_score%. (b) Rec_score%. (c)F_score%. (d) Kappa_score%. (e) OA%.
(a)(b)(c)(d)(e)Figure 7
Comparison of the PEM for oversampling, undersampling, and hybrid sampling applied on the SV dataset. (a) Prec_score%. (b) Rec_score%. (c)F_score%. (d) Kappa_score%. (e) OA%.
(a)(b)(c)(d)(e)Figure 8
Comparison of the PEM for oversampling, undersampling, and hybrid sampling applied on the PU dataset: (a) Prec_score%. (b) Rec_score%. (c)F_score%. (d) Kappa_score%. (e) OA%.
(a)(b)(c)(d)(e)The calculation and comparison of elapsed time for executing the entire training system, i.e., the time complexity, also play a vital role. This comparison is graphically illustrated in Figure9 as a 3D bar chart. The figure shows that hybrid sampling is the amalgamation of an oversampler, and an undersampler holds a more complex structure and takes the highest time to build the model. Then come the oversampling techniques that generate synthetic samples to recreate the balanced dataset, which takes a certain amount of time. Finally, the order is followed by undersampling strategies whose elapsed time is least due to the deletion of linked neighborhood data samples. This order is thoroughly followed irrespective of the type of the applied tree-based ensemble classifier.Figure 9
Comparison of maximum TE (in secs) for the oversampling, undersampling, and hybrid sampling techniques taken for each of the classifiers applied on IP, SV, and PU datasets.The comparison between the elapsed time with units in seconds is also inevitable for the different ensemble tree-based classifiers we used in our work. The order of increment in time of execution for those classifier models is consistent: DT < ET < RF < RREF << RoF. According to the previous discussion, RREF and RoF provide the best outcomes for all the resampling strategies. The time taken by RoF is at most 136.85 times (undersampling in IP) and at least 32.12 times (hybrid sampling in PU) higher than RREF. The other TE (in secs) ratios for RREF and RoF, as shown in Figure9, lie within the said range.The entire study summarizes that oversampling strategies are more compatible with hyperspectral images as they are more consistent than undersampling and hybrid sampling strategies. Oversampling provides the creation of new synthetic instances that inevitably regenerate the existing dataset and bring in a balance between the samples of major and minor classes. Due to the overpopulation of the samples, the dataset does not suffer from the lack of labeled data, and no feature or information is lost, which is an issue in undersampling. The fully balanced dataset is then fed to the tree-based ensemble classifier models as input. The decision trees are made in equilibrium with the balanced samples and produce elementary decisions. Those decision outcomes are passed into forests, and the averaged classification result is ultimately obtained. However, from Tables2, 5, and 8, we found that SMOTE is mostly better than ADASYN when the ratio of class imbalance is high. This is due to the SMOTE-augmented minority class overall anticipated value being the same as the original minority class expected value, but its variance is lower. As a result, SMOTE has little effect on classifiers that use mean values and total variances to determine categorization rules. ADASYN is also helpful in reducing the learning bias caused by the data distribution of the original imbalanced dataset. The disadvantage of ADASYN over SMOTE is that the procedure is more complex and time-consuming due to its adaptive nature. Additionally, the contrasts are found to be minor between the PEMs derived by RREF and RoF as tree-based ensemble classifier models with each of the oversampling, undersampling, and hybrid sampling procedures. Finally, we can say that the classifier RREF, in combination with the oversampling algorithms such as SMOTE and ADASYN, is capable of producing outstanding classification results for balanced hyperspectral datasets.


## 4.3.1. For Indian Pines Dataset

(1) Effect of Oversampling. Table 3 describes the comparison between the tree-based classifier model performances due to the oversampling of the data. It is evident that SMOTE achieves better results in all performance metrics for all classifiers. RREF attains the highest accuracy of 89.49%, with an approximation of 1.32, slightly higher than RoF. Also, the total time consumed is maximum for ADASYN for all the classifiers, especially for RoF.Table 3
Performance comparison between the oversampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall,F score, kappa, and OA and TE calculated in seconds for the IP dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTROS68.41 ± 1.867.13 ± 2.1867.47 ± 2.6144.62 ± 1.4767.06 ± 1.743.516SMOTE69.5 ± 2.4968.77 ± 2.8768.84 ± 2.9545.92 ± 1.468.68 ± 1.934.629B-SMOTE68.37 ± 1.667.51 ± 2.0968.14 ± 2.1945.89 ± 2.2168.42 ± 1.836.495ADASYN68.48 ± 2.6567.74 ± 1.5668.19 ± 2.3545.41 ± 2.4668.53 ± 1.387.895ETROS79.25 ± 2.1280.61 ± 1.2679.56 ± 1.3960.43 ± 1.1480.57 ± 1.246.439SMOTE79.98 ± 2.6881.25 ± 2.8580.24 ± 2.1362.3 ± 1.0882.28 ± 1.767.867B-SMOTE79.57 ± 1.5881.16 ± 2.6179.95 ± 3.0260.76 ± 2.1981.99 ± 1.259.137ADASYN79.89 ± 2.2880.93 ± 2.9480.18 ± 1.4462.21 ± 2.3182.08 ± 1.099.248RFROS80.13 ± 1.1281.15 ± 2.5580.54 ± 1.2871.8 ± 2.2783.54 ± 1.896.256SMOTE88.96 ± 1.1281.72 ± 1.7980.95 ± 1.1572.98 ± 1.3284.72 ± 1.128.282B-SMOTE89.35 ± 1.7680.91 ± 1.779.82 ± 2.5161.86 ± 1.3783.07 ± 1.210.056ADASYN89.87 ± 1.6381.33 ± 1.6780.26 ± 2.3472.05 ± 2.7483.87 ± 1.7810.01RoFROS84.32 ± 1.1284.45 ± 1.1184.5 ± 1.3777.28 ± 1.8785.15 ± 1.073274.945SMOTE89.5 ± 2.0789.53 ± 1.0189.37 ± 1.0681.34 ± 2.2588.99 ± 1.853645.765B-SMOTE88.16 ± 1.6586.67 ± 2.737.39 ± 1.4279.84 ± 2.487.65 ± 1.733958.983ADASYN88.93 ± 2.6188.56 ± 2.9589.11 ± 2.4780.37 ± 2.9588.46 ± 1.683979.156RREFROS86.36 ± 1.3187.92 ± 1.2685.75 ± 2.5779.84 ± 2.184.94 ± 1.0943.875SMOTE89.71 ± 2.4690.15 ± 2.7691.21 ± 1.183.48 ± 1.7389.49 ± 1.3256.953B-SMOTE88.73 ± 2.9288.94 ± 2.189.44 ± 2.9479.8 ± 1.7888.47 ± 1.9455.326ADASYN89.56 ± 2.289.85 ± 2.7290.37 ± 1.0280.36 ± 2.3289.08 ± 1.5361.578(2) Effect of Undersampling. Table 4 describes the comparison between the tree-based classifier model performances due to the oversampling of the data. It is imperative that TL achieves better results in all performance metrics for all classifiers, except for DT, where NCL attains the highest OA. RREF attains the highest accuracy of 85.32%, with an approximation of 2.76, which is slightly higher than RoF. Also, the total time consumed is maximum for TL for all the classifiers, especially for RoF.Table 4
Performance comparison between the undersampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the IP dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTRUS53.16 ± 1.0727.3 ± 1.3526.27 ± 1.723.92 ± 1.6827.35 ± 1.50.045Tomek68.59 ± 1.0968.44 ± 1.6668.46 ± 1.6944.14 ± 1.4568.42 ± 1.582.93NCL68.44 ± 1.3574.74 ± 1.669.9 ± 1.4644.68 ± 1.4669.98 ± 1.042.079ENN66.34 ± 1.367.51 ± 1.2266.57 ± 1.5743.46 ± 1.2467.52 ± 2.211.16ETRUS65.37 ± 1.6638.29 ± 1.2837.95 ± 1.0938.95 ± 1.7538.19 ± 2.830.216Tomek78.32 ± 1.1180.42 ± 1.1578.89 ± 1.3658.91 ± 1.5379.95 ± 2.63.734NCL75.17 ± 1.4676.65 ± 1.3975.28 ± 1.2354.61 ± 1.9576.6 ± 2.592.406ENN72.3 ± 1.3773.76 ± 1.2972.24 ± 1.8251.44 ± 1.4173.75 ± 2.311.248RFRUS64.84 ± 1.5634.15 ± 1.2732.23 ± 1.0947.22 ± 1.7634.06 ± 1.030.214Tomek79.4 ± 1.7380.69 ± 1.3679.46 ± 1.1561.25 ± 1.3880.6 ± 1.584.297NCL75.68 ± 1.0477.1 ± 1.175.68 ± 1.4356.29 ± 176.96 ± 2.723.557ENN71.36 ± 1.3772.84 ± 1.4171.14 ± 1.6351.55 ± 1.9572.77 ± 2.540.515RoFRUS67.87 ± 1.2637.61 ± 1.1338.62 ± 1.4149.5 ± 1.3540.84 ± 1.96957.643Tomek80.5 ± 1.3482.14 ± 1.3880.31 ± 1.4976.35 ± 1.1984.83 ± 2.081267.89NCL74.33 ± 1.5874.89 ± 1.1574.29 ± 1.4563.44 ± 1.479.25 ± 2.771043.895ENN73.77 ± 1.3172.61 ± 1.1669.53 ± 1.159.83 ± 1.5474.12 ± 1.68996.054RREFRUS69.11 ± 1.5538.17 ± 1.4639.21 ± 1.1456.3 ± 1.0444.37 ± 2.415.946Tomek82.47 ± 1.2482.61 ± 1.4780.48 ± 1.3778.58 ± 1.6385.32 ± 2.769.279NCL75.47 ± 1.2375.97 ± 1.1972.13 ± 1.6662.1 ± 1.2779.85 ± 1.156.789ENN73.58 ± 1.6271.51 ± 1.7569.88 ± 1.2860.62 ± 175.31 ± 2.096.241(3) Effect of Hybrid Sampling. Table 5 compares the tree-based classifier model performances due to the hybrid sampling of the data. It can be inferred that SMOTETomek achieves better results in all performance metrics for all classifiers. RoF attains the highest accuracy of 82.74%, with an approximation of 2.16, slightly higher than RoF. Also, the total time consumed is maximum for SMOTETomek for all the classifiers, especially for RoF.Table 5
Performance comparison between the hybrid sampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the IP dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTSMOTETomek68.39 ± 1.7768.46 ± 1.1368.37 ± 1.4645.21 ± 1.9268.49 ± 2.3816.956SMOTEENN66.16 ± 1.3567.14 ± 1.4866.31 ± 1.7246.78 ± 1.567.134 ± 2.1816.357ETSMOTETomek78.56 ± 1.280.15 ± 1.5779.09 ± 1.5159.69 ± 1.7680.09 ± 1.3415.672SMOTEENN72.55 ± 1.0474.2 ± 1.3972.44 ± 1.8452.31 ± 1.4873.96 ± 2.3115.118RFSMOTETomek79.12 ± 1.2680.55 ± 1.7179.46 ± 1.3261.37 ± 1.1780.54 ± 2.1918.171SMOTEENN72.13 ± 1.8273.36 ± 1.7271.64 ± 1.9952.67 ± 1.5573.317 ± 2.3316.613RoFSMOTETomek82.37 ± 1.1284.23 ± 1.6681.56 ± 1.1264.74 ± 1.1782.74 ± 2.164195.326SMOTEENN74.66 ± 1.5875.82 ± 1.7573.73 ± 1.7854.85 ± 1.4376.19 ± 1.733628.153RREFSMOTETomek81.71 ± 1.0281.13 ± 1.5979.93 ± 1.4462.83 ± 1.682.32 ± 1.3689.452SMOTEENN74.12 ± 1.2974.29 ± 1.8573.16 ± 1.6753.19 ± 1.5675.43 ± 1.0185.31


## 4.3.2. For Salinas Valley Dataset

(1) Effect of Oversampling. Table 6 compares the tree-based classifier model performances due to the oversampling of the data. ADASYN achieves better results in all performance metrics for all classifiers. RREF attains the highest accuracy of 95.84%, with an approximation of 1.33, slightly higher than RoF. Also, the total time consumed is maximum for ADASYN for all the classifiers, especially for RoF.Table 6
Performance comparison between the oversampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the SV dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTROS88.51 ± 2.8689.54 ± 2.7589.59 ± 2.4642.17 ± 2.5788.78 ± 1.7427.487SMOTE89.48 ± 1.3889.49 ± 1.8790.91 ± 2.5646.63 ± 2.1789.36 ± 1.1932.258B-SMOTE89.47 ± 2.4589.39 ± 1.9589.47 ± 2.7546.22 ± 2.1189.05 ± 1.3537.898ADASYN89.64 ± 2.4389.62 ± 1.8489.67 ± 1.348.3 ± 2.0689.59 ± 1.6339.618ETROS93.36 ± 2.7193.33 ± 2.3193.32 ± 2.2260.78 ± 2.0292.05 ± 1.8451.385SMOTE93.35 ± 2.8293.29 ± 2.293.24 ± 2.162.69 ± 2.7293.11 ± 1.2252.384B-SMOTE93.36 ± 1.4193.32 ± 1.8693.34 ± 2.4561.88 ± 1.5792.67 ± 1.4764.989ADASYN93.46 ± 2.8693.35 ± 2.1393.48 ± 2.8662.92 ± 2.593.3 ± 1.1365.096RFROS93.31 ± 2.2993.26 ± 2.993.29 ± 1.1159.76 ± 2.7892.26 ± 1.2367.545SMOTE93.36 ± 1.1593.32 ± 1.4793.26 ± 2.0961.84 ± 1.8693.27 ± 1.768.773B-SMOTE93.11 ± 2.2193.6 ± 2.0293.23 ± 1.9660.44 ± 2.3193.04 ± 1.4168.56ADASYN93.48 ± 1.3793.32 ± 1.5893.31 ± 2.9962.88 ± 2.0594.64 ± 1.3668.796RoFROS94.47 ± 1.0494.55 ± 1.7894.52 ± 1.8371.79 ± 2.7794.85 ± 1.234644.89SMOTE95.43 ± 1.7295.56 ± 2.7595.27 ± 1.3572.36 ± 1.6895.48 ± 1.274889.134B-SMOTE95.48 ± 2.5995.59 ± 2.4695.25 ± 1.3172.51 ± 1.5195.18 ± 1.364755.675ADASYN95.6 ± 1.895.87 ± 1.5795.75 ± 2.8472.68 ± 2.8995.7 ± 1.865023.45RREFROS94.23 ± 2.2794.07 ± 2.6394.59 ± 2.9481.86 ± 1.4193.27 ± 1.4275.543SMOTE94.25 ± 1.1693.97 ± 2.5994.3 ± 2.7881.12 ± 1.495.57 ± 1.1887.642B-SMOTE94.47 ± 2.1892.45 ± 2.3294.21 ± 1.7980.12 ± 2.0794.25 ± 1.1389.654ADASYN95.43 ± 1.4594.83 ± 1.8594.82 ± 2.782.94 ± 1.0295.84 ± 1.3395.437(2) Effect of Undersampling. Table 7 describes the comparison between the tree-based classifier model performances due to the oversampling of the data. It is imperative that TL achieves better results in all performance metrics for all classifiers. RoF attains the highest accuracy of 95.41%, with an approximation of 1.5, which is slightly higher than RREF. Also, the total time consumed is maximum for TL for all the classifiers, especially for RoF.Table 7
Performance comparison between the undersampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the SV dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTRUS82.74 ± 2.9876.44 ± 2.577.23 ± 1.4939.94 ± 2.0976.4 ± 1.472.067Tomek89.81 ± 2.4889.42 ± 2.9189.32 ± 2.6846.75 ± 1.6579.83 ± 1.063.705NCL89.86 ± 1.9989.89 ± 2.0589.87 ± 2.7746.17 ± 1.6479.97 ± 1.192.13ENN89.3 ± 2.7588.94 ± 2.7888.98 ± 2.4845.7 ± 2.4778.93 ± 1.153.545ETRUS86.91 ± 2.4282.9 ± 1.1583.45 ± 2.1958.68 ± 2.1182.95 ± 2.693.256Tomek93 ± 2.5593.9 ± 2.5693.6 ± 1.0260.42 ± 2.1693.22 ± 1.2419.895NCL91.51 ± 2.491.45 ± 1.6291.35 ± 2.7758.67 ± 1.9391.36 ± 1.7218.444ENN90.67 ± 1.2490.46 ± 1.9990.45 ± 1.5357.58 ± 1.890.44 ± 1.3218.404RFRUS87.12 ± 1.1483.35 ± 2.7483.8 ± 1.3169.4 ± 2.4683.35 ± 1.153.244Tomek93.12 ± 2.3793.18 ± 2.6593.35 ± 1.4770.31 ± 1.9593.56 ± 1.2529.694NCL91.68 ± 2.8991.55 ± 1.5491.55 ± 1.7768.73 ± 2.0691.49 ± 2.1228.271ENN90.57 ± 1.690.43 ± 2.990.48 ± 2.467.49 ± 1.0690.41 ± 1.7327.399RoFRUS88.77 ± 1.9483.54 ± 2.2484.1 ± 2.7380.1 ± 1.5385.32 ± 1.81103.763Tomek93.44 ± 2.8394.8 ± 1.9994.92 ± 1.6581.45 ± 1.5894.41 ± 1.53219.078NCL92.26 ± 2.3493.23 ± 2.5793.37 ± 2.4280.27 ± 2.3893.68 ± 2.842964.741ENN90.29 ± 2.7392.32 ± 2.8291.7 ± 2.4979.17 ± 2.5993.54 ± 2.982895.973RREFRUS88.65 ± 1.0381.8 ± 2.1979.79 ± 1.8479.62 ± 2.0984.93 ± 219.439Tomek93.88 ± 2.3994.48 ± 2.5794.94 ± 1.3281.59 ± 2.6394.44 ± 2.3125.452NCL91.82 ± 1.5892.26 ± 2.1591.32 ± 1.4178.8 ± 2.2193.7 ± 2.621.214ENN89.88 ± 1.9890.68 ± 2.5291.94 ± 2.6579.11 ± 1.4693.18 ± 2.4120.84(3) Effect of Hybrid Sampling. Table 8 describes the comparison between the tree-based classifier model performances due to the hybrid sampling of the data. It can be inferred that SMOTETomek achieves better results in all performance metrics for all classifiers. RoF attains the highest accuracy of 94.89%, with an approximation of 2.24, which is slightly higher than RoF. Also, the total time consumed is maximum for SMOTETomek for all the classifiers, especially for RoF.Table 8
Performance comparison between the hybrid sampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the SV dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTSMOTETomek89.55 ± 2.0489.54 ± 1.6489.58 ± 1.1646.28 ± 1.8789.46 ± 2.1191.796SMOTEENN88.72 ± 2.2488.62 ± 1.5488.6 ± 2.5345.18 ± 2.7688.59 ± 1.9583.808ETSMOTETomek93.12 ± 2.6793.19 ± 1.6193.12 ± 1.2160.34 ± 2.8293.01 ± 2.35105.412SMOTEENN90.64 ± 2.3690.41 ± 1.1490.49 ± 1.7157.31 ± 1.9690.38 ± 1.8799.811RFSMOTETomek93.01 ± 2.4293.28 ± 2.993.29 ± 1.3268.35 ± 1.1592.97 ± 2.1459.343SMOTEENN90.59 ± 1.9690.31 ± 1.2590.21 ± 2.0667.27 ± 2.5190.26 ± 1.8452.498RoFSMOTETomek94.89 ± 1.3994.77 ± 1.7494.81 ± 1.5479.28 ± 1.0393.89 ± 2.246297.542SMOTEENN91.72 ± 192.12 ± 1.2691.94 ± 1.1869.11 ± 1.8191.77 ± 1.686031.47RREFSMOTETomek93.29 ± 2.8393.14 ± 2.0993.57 ± 1.2678.49 ± 2.0793.17 ± 2.12186.743SMOTEENN91.09 ± 1.1291.17 ± 1.5491.79 ± 1.4688.2 ± 1.5291.41 ± 1.48163.265


## 4.3.3. For Pavia University Dataset

(1) Effect of Oversampling. Table 9 depicts the comparison between the tree-based classifier model performances due to the oversampling of the data. It is evident that SMOTE achieves better results in all performance metrics for all classifiers. RoF attains the highest accuracy of 91.89%, with an approximation of 1.45, which is slightly higher than RoF. Also, the total time consumed is maximum for ADASYN for all the classifiers, especially for RoF.Table 9
Performance comparison between the oversampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the PU dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTROS78.96 ± 1.9179.28 ± 2.1379.1 ± 3.3637.12 ± 2.9377.17 ± 1.8628.216SMOTE79.45 ± 2.1479.96 ± 2.6179.89 ± 1.4737.92 ± 1.2279.94 ± 1.1729.025B-SMOTE78.73 ± 3.1778.43 ± 3.0478.62 ± 3.3335.15 ± 3.5478.37 ± 1.0628.815ADASYN78.63 ± 2.2778.12 ± 3.0478.41 ± 2.5435.45 ± 1.978.57 ± 1.730.451ETROS84.79 ± 2.6485.77 ± 1.3583.58 ± 3.4443.85 ± 2.9884.67 ± 1.9556.781SMOTE84.93 ± 2.6585.86 ± 3.1583.69 ± 2.7445.9 ± 1.2685.71 ± 1.5957.864B-SMOTE84.74 ± 3.285.72 ± 1.3383.55 ± 3.8444.82 ± 2.9185.17 ± 1.8957.336ADASYN84.61 ± 1.185.69 ± 2.5183.43 ± 1.8744.27 ± 2.1285.51 ± 1.859.337RFROS84.28 ± 2.6685.26 ± 3.9583.15 ± 2.3945.24 ± 3.2884.25 ± 1.6562.336SMOTE84.56 ± 1.4185.96 ± 2.7383.8 ± 3.648.04 ± 1.3186.89 ± 1.9765.369B-SMOTE83.17 ± 3.2885.9 ± 1.4881.9 ± 1.8237.28 ± 2.4184.01 ± 1.4365.57ADASYN83.92 ± 2.9984.82 ± 2.8781.94 ± 1.1338.87 ± 3.2786.04 ± 1.8866.634RoFROS86.57 ± 1.3486.85 ± 3.4984.96 ± 2.4850.25 ± 3.3287.24 ± 1.253982.435SMOTE87.93 ± 3.6488.26 ± 3.1288.17 ± 2.2952.93 ± 1.291.89 ± 1.453543.257B-SMOTE87.52 ± 3.5688.22 ± 1.2888.03 ± 2.5543.48 ± 1.4788.55 ± 1.563421.805ADASYN87.49 ± 1.9388.1 ± 3.4688.1 ± 3.6440.16 ± 2.8390.38 ± 1.14721.63RREFROS86.59 ± 3.8286.83 ± 3.3884.99 ± 3.6550.28 ± 3.8387.24 ± 1.485.87SMOTE88.96 ± 3.3288.79 ± 1.8388.95 ± 1.4652.32 ± 1.591.98 ± 1.1687.654B-SMOTE87.54 ± 3.7488.2 ± 3.6188.09 ± 2.1743.48 ± 2.7188.53 ± 1.8384.764ADASYN87.45 ± 3.8388.19 ± 1.1888.17 ± 2.9251.24 ± 3.0790.58 ± 1.7488.453(2) Effect of Undersampling. Table 10 describes the comparison between the tree-based classifier model performances due to the oversampling of the data. It is imperative that TL achieves better results in all performance metrics for all classifiers, except for DT, where ENN attains the highest OA. RoF attains the highest accuracy of 89.91%, with an approximation of 1.34, which is slightly higher than RREF. Also, the total time consumed is maximum for TL for all the classifiers, especially for RoF.Table 10
Performance comparison between the undersampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the PU dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTRUS78.92 ± 1.1643.2 ± 1.5548.35 ± 2.915.29 ± 1.5742.96 ± 1.850.818Tomek78.76 ± 2.8179.17 ± 1.1478.99 ± 2.8836.7 ± 1.2679.13 ± 1.793.185NCL79.82 ± 1.4681.79 ± 2.4980.36 ± 1.7739.89 ± 1.8682.51 ± 2.352.588ENN79.38 ± 2.8581.53 ± 1.7179.78 ± 2.1339.82 ± 2.8681.69 ± 1.912.566ETRUS83.24 ± 2.3344.17 ± 2.0648.14 ± 2.1517.74 ± 1.1544.06 ± 2.511.806Tomek84.4 ± 2.3985.53 ± 2.6483.22 ± 2.9142.91 ± 2.1585.49 ± 1.8414.223NCL83.87 ± 1.5984.96 ± 1.9382.57 ± 1.2842.25 ± 2.8884.92 ± 2.213.34ENN82.83 ± 1.884.11 ± 1.9181.36 ± 2.9837.48 ± 1.4984.13 ± 1.8113.806RFRUS83.36 ± 2.5243.2 ± 1.5147.17 ± 1.6317.16 ± 1.7943.16 ± 2.7123.161Tomek84.19 ± 1.3185.33 ± 1.0583.12 ± 1.1743.17 ± 1.8285.29 ± 2.1728.126NCL83.75 ± 1.5584.91 ± 2.4382.7 ± 2.2342.84 ± 2.2584.97 ± 2.6727.781ENN82.81 ± 2.184.12 ± 1.6881.43 ± 1.7538.27 ± 1.5684.1 ± 2.1727.765RoFRUS85.32 ± 1.6448.46 ± 1.6649.77 ± 2.6719.87 ± 2.6747.29 ± 1.111769.731Tomek85.97 ± 2.3486.34 ± 1.4485.34 ± 2.4347.52 ± 1.3588.71 ± 1.342135.432NCL84.31 ± 2.2385.81 ± 2.2683.2 ± 1.9147.63 ± 2.5887.43 ± 2.581960.372ENN83.11 ± 1.0284.59 ± 2.8281.8 ± 2.7341.22 ± 387.11 ± 1.751904.97RREFRUS85.13 ± 1.3847.71 ± 2.6849.28 ± 2.918.85 ± 1.9646.85 ± 1.1617.298Tomek85.33 ± 1.2285.95 ± 1.6485.81 ± 2.4746.24 ± 1.0989.92 ± 2.1123.064NCL84.02 ± 1.885.49 ± 1.2983.69 ± 2.2745.87 ± 2.2687.81 ± 2.3221.873ENN82.91 ± 1.5784.8 ± 2.3882.24 ± 1.639.97 ± 2.7887.03 ± 1.8420.09(3) Effect of Hybrid Sampling. Table 11 describes the comparison between the tree-based classifier model performances due to the hybrid sampling of the data. It can be inferred that SMOTETomek achieves better results in all performance metrics for all classifiers. RREF attains the highest accuracy of 85.83%, with an approximation of 2.32, which is slightly higher than RoF. Also, the total time consumed is maximum for SMOTETomek for all the classifiers, especially for RoF.Table 11
Performance comparison between the hybrid sampling techniques associated with different tree-based ensemble classifiers in terms of the percentages of precision, recall, F score, kappa, and OA and TE calculated in seconds for the PU dataset.
Prec_scoreRec_scoreF_scoreKappa_scoreOATE (in secs)DTSMOTETomek78.77 ± 1.3278.93 ± 2.378.82 ± 2.9335.37 ± 1.1178.89 ± 2.5189.671SMOTEENN79.45 ± 2.6381.53 ± 2.8579.88 ± 2.9337.62 ± 2.0581.47 ± 2.1880.852ETSMOTETomek84.46 ± 2.7885.47 ± 1.6783.18 ± 1.1842.71 ± 1.0485.36 ± 1.3497.329SMOTEENN82.91 ± 1.2384.17 ± 2.2581.42 ± 1.8539.77 ± 1.3284.12 ± 2.4594.81RFSMOTETomek82.95 ± 2.2383.85 ± 1.6980.74 ± 1.2548.99 ± 1.683.84 ± 2.67101.411SMOTEENN82.61 ± 1.0883.73 ± 2.8880.72 ± 1.1848.68 ± 2.6683.73 ± 2.7196.546RoFSMOTETomek85.28 ± 2.3486.95 ± 2.7587.37 ± 1.9566.42 ± 2.6486.12 ± 2.145231.754SMOTEENN85.18 ± 1.6986.71 ± 2.5187.48 ± 1.5149.88 ± 2.6885.54 ± 1.074987.34RREFSMOTETomek84.79 ± 1.885.7 ± 2.786.52 ± 1.7578.13 ± 1.1485.83 ± 2.32162.864SMOTEENN84.44 ± 2.2985.27 ± 2.9785.74 ± 2.0850.49 ± 2.9385.17 ± 1.33149.063


## 4.3.4. Comprehensive Discussion

The total number of land cover pixels in each band of the IP, SV, and PU datasets is 10249, 54129, and 42776, respectively. Also, SV represents a valley scene, whereas the others represent urban sites. From the tables above, certain inferences can be drawn. As an oversampling technique, SMOTE stands out to be best for IP and PU datasets, but for SV, ADASYN produces the best result throughout all classifiers. SMOTE and ADASYN achieve better outcomes for all the datasets than other oversampling methods. Figure4 depicts the graphical comparison of the performances of SMOTE and ADASYN in terms of OA%. TL is the best technique for achieving good results for the HS datasets for the undersampling approach. The statistics for NCL have been closer to the outcomes of TL, although it has outperformed TL with DT classifier for all the datasets. Figure 5 represents the performance comparison between TL and NCL based on OA%. SMOTETomek has surpassed SMOTEENN in all aspects of performance for all the datasets.Figure 4
OA% comparison between SMOTE and ADASYN associated with the tree-based ensemble classifiers for IP, SV, and PU datasets.Figure 5
OA% comparison between TL and NCL associated with the tree-based ensemble classifiers for IP, SV, and PU datasets.Figures6–8 represent all EM data plotted in graphs to understand better the effects of resampling techniques on the HS datasets, viz. IP, SV, and PU. The blue, red, and green curves represent the oversampling, undersampling, and hybrid sampling technique that produces a better result than other resampling techniques. We can infer the more appropriate strategy for further research from these graphical illustrations. Figures 6(a)–6(e) show that the PEMs, viz. precision, recall, F_score, kappa, and OA of the oversampling techniques with the classifier RREF, are the highest for the IP dataset, whereas DT is the least impactful. For hybrid sampling, RoF achieves the best overall PEM scores. The SV dataset obtains the best outcome in oversampling and RREF, whereas there is only a little difference between the performance measures, statistically, that dwells between RoF and RREF. The same scenario applies to the PU dataset in terms of PEMs, as shown in Figures 7(a)–7(e). For the IP dataset, represented by Figures 8(a)–8(e), with the lowest dimension containing less spectral resolutions, RREF performs best for oversampling and undersampling, but RoF stands out in hybrid sampling. The other two datasets, SV and PU, have higher dimensions enriched with more differentiative spectral features. When they undergo undersampling or hybrid sampling, RoF makes the most corrective decisions. These figures conclude that DT, a simple and basic tree-based ensemble classifier, produces the least accuracy for all datasets. However, RREF is an ensemble of two efficient and state-of-art tree-based ensemble classifiers. It generates maximum OA for all datasets associated with the oversampling techniques, SMOTE and ADASYN, and the undersampling technique, TL. However, hybrid sampling is found to be more compatible with RoF.Figure 6
Comparison of the PEM for oversampling, undersampling, and hybrid sampling applied on the IP dataset. (a) Prec_score%. (b) Rec_score%. (c)F_score%. (d) Kappa_score%. (e) OA%.
(a)(b)(c)(d)(e)Figure 7
Comparison of the PEM for oversampling, undersampling, and hybrid sampling applied on the SV dataset. (a) Prec_score%. (b) Rec_score%. (c)F_score%. (d) Kappa_score%. (e) OA%.
(a)(b)(c)(d)(e)Figure 8
Comparison of the PEM for oversampling, undersampling, and hybrid sampling applied on the PU dataset: (a) Prec_score%. (b) Rec_score%. (c)F_score%. (d) Kappa_score%. (e) OA%.
(a)(b)(c)(d)(e)The calculation and comparison of elapsed time for executing the entire training system, i.e., the time complexity, also play a vital role. This comparison is graphically illustrated in Figure9 as a 3D bar chart. The figure shows that hybrid sampling is the amalgamation of an oversampler, and an undersampler holds a more complex structure and takes the highest time to build the model. Then come the oversampling techniques that generate synthetic samples to recreate the balanced dataset, which takes a certain amount of time. Finally, the order is followed by undersampling strategies whose elapsed time is least due to the deletion of linked neighborhood data samples. This order is thoroughly followed irrespective of the type of the applied tree-based ensemble classifier.Figure 9
Comparison of maximum TE (in secs) for the oversampling, undersampling, and hybrid sampling techniques taken for each of the classifiers applied on IP, SV, and PU datasets.The comparison between the elapsed time with units in seconds is also inevitable for the different ensemble tree-based classifiers we used in our work. The order of increment in time of execution for those classifier models is consistent: DT < ET < RF < RREF << RoF. According to the previous discussion, RREF and RoF provide the best outcomes for all the resampling strategies. The time taken by RoF is at most 136.85 times (undersampling in IP) and at least 32.12 times (hybrid sampling in PU) higher than RREF. The other TE (in secs) ratios for RREF and RoF, as shown in Figure9, lie within the said range.The entire study summarizes that oversampling strategies are more compatible with hyperspectral images as they are more consistent than undersampling and hybrid sampling strategies. Oversampling provides the creation of new synthetic instances that inevitably regenerate the existing dataset and bring in a balance between the samples of major and minor classes. Due to the overpopulation of the samples, the dataset does not suffer from the lack of labeled data, and no feature or information is lost, which is an issue in undersampling. The fully balanced dataset is then fed to the tree-based ensemble classifier models as input. The decision trees are made in equilibrium with the balanced samples and produce elementary decisions. Those decision outcomes are passed into forests, and the averaged classification result is ultimately obtained. However, from Tables2, 5, and 8, we found that SMOTE is mostly better than ADASYN when the ratio of class imbalance is high. This is due to the SMOTE-augmented minority class overall anticipated value being the same as the original minority class expected value, but its variance is lower. As a result, SMOTE has little effect on classifiers that use mean values and total variances to determine categorization rules. ADASYN is also helpful in reducing the learning bias caused by the data distribution of the original imbalanced dataset. The disadvantage of ADASYN over SMOTE is that the procedure is more complex and time-consuming due to its adaptive nature. Additionally, the contrasts are found to be minor between the PEMs derived by RREF and RoF as tree-based ensemble classifier models with each of the oversampling, undersampling, and hybrid sampling procedures. Finally, we can say that the classifier RREF, in combination with the oversampling algorithms such as SMOTE and ADASYN, is capable of producing outstanding classification results for balanced hyperspectral datasets.


## 5. Conclusion

Data imbalance has been a delicate issue in big data scenarios with enormous and high-dimensional data. Due to imbalance, classifiers suffer from low accuracy and quality. In our work, we have offered a brilliant study of comparison between the effects of oversampling, undersampling, and hybrid sampling on three highly imbalanced hyperspectral datasets. Furthermore, we rely on the fact presented by previous researchers that the tree-based ensemble classifiers are more useful when the data samples belonging to different classes are nearly balanced. As an effect, we have incorporated a handful of eminent ensemble tree strategies that have achieved remarkable outcomes. For building our models for each resampling strategy and the individual classifier, we executed 50 models for each dataset. For all HS datasets, our findings revealed that in oversampling, SMOTE and ADASYN, while in undersampling, Tomek Links, and in hybrid sampling, SMOTETomek techniques are more compatible with RoF and RREF. Practically and experimentally, oversamplers achieve higher performance statistics than other resampling techniques as they sustain and sometimes add further features for better classification. On the other hand, in undersampling and hybrid sampling, there is a provision for removing redundant data from major classes, which sometimes may lead to loss of information, which affects the classification performance abruptly. Furthermore, there is enough scope to improve all the sampling strategies to become compatible with voluminous real-life datasets for robust applicabilities.As a limitation to our present work, we can list specific points: (1) the classifiers used need to be cross-validated to produce more optimized outcomes; (2) a limited number of resampling techniques are used with limited hyperparameters; and (3) the computation and time complexity are high. In the future, we plan to incorporate recently developed variants of SMOTE and ADASYN along with more efficient forest ensembles. Also, we will try to explore the TL and its possibility of being optimized to achieve a more accurate outcome.



---

*Source: 8735201-2022-04-30.xml*