# Classification of Imbalanced Data Represented as Binary Features
## 2 Materials and Methods
### Oversampling Methods  
Imbalanced datasets exist in many real-world data. Class imbalance occurs when the number of samples in a class is far less than in the other class(es). The target class is usually the minority class or the class which has far fewer samples than the other class(es), and a sample in this class is called as positive sample, while a sample from the other class is called \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Dataset** & **Number of Features** & **Number of Samples** & **Target Class Ratio** \\ \hline SPECT & 22 & 267 & 55:212 \\ analcatdata\_fraud & 10 & 42 & 29:13 \\ car\_evaluation & 22 & 1728 & 1210:384:65:69 \\ MRSA pathogenicity & 1978 & 96 & 33:63 \\ MRSA drug resistance & 1976 & 94 & 75:19 \\ _C. difficile_ pathogenicity & 2610 & 77 & 46:31 \\ ring\_1500 vs3000 & 20 & 4500 & 1500:3000 \\ ring\_100 vs500 & 20 & 600 & 100:500 \\ ring\_100 vs2000 & 20 & 2100 & 100:2000 \\ ring\_60 vs3000 & 20 & 3060 & 60:3000 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Basic information of the dataset used in this study. as negative sample. This problem can lead classifiers to bias toward the majority class, because it will be most likely to predict a positive sample as a negative sample. Therefore, a method to deal with class imbalance should be performed first before providing the data as an input to the classifiers to improve the detection of minority samples and the performance metrics. Many methods exist to deal with class imbalance either at the algorithm level or the data level. At the algorithm level, methods have been proposed to modify the algorithm by either changing or adding another line of algorithm to solve the imbalanced data problem. At the data level, there are multiple available forms of the resampling method. This method consists of oversampling and undersampling to rebalance the original dataset. The undersampling method is performed by removing samples of the majority class, while oversampling method is performed by adding samples of the minority class to the original dataset so that the new dataset becomes balanced. The synthetic minority oversampling technique (SMOTE) is known as the pioneer method for rebalancing an imbalanced dataset. The method uses \(k\)-nearest neighbors in creating new synthetic samples to balance the class distribution of the dataset [5]. Each positive sample is paired with its nearest neighbors, and then, along a line connecting the sample with one of the selected nearest neighbors, a synthetic sample is generated. The process is repeated until the number of positive and negative samples becomes balanced. Many methods were developed to improve the classification performances based on SMOTE technique. ADASYN, or the adaptive synthetic sampling approach for imbalance learning, is another technique to deal with class imbalance. The main idea of this method is to create synthetic samples based on the level of difficulty in learning the samples of the minority class [6]. A positive sample is labelled as difficult to learn if it has more negative samples in its \(k\)-nearest neighbors. Therefore, the harder a positive sample is to learn, the more synthetic samples are generated. Borderline SMOTE is a SMOTE-based technique concentrating on the borderline of each class [7]. It states that a sample located on or near the borderline will provide a greater contribution to classification. It highlights the problem that borderline samples tend to be misclassified by classification methods for often than samples located far from the borderline. For that reason, this technique tries to strengthen the borderline of positive samples by generating synthetic samples along this region. This idea of borderline SMOTE in selecting certain regions to generate synthetic samples inspired other SMOTE-based techniques in oversampling methods, such as safe-level SMOTE and relocating safe level SMOTE.