# Classification of Imbalanced Data Represented as Binary Features
## 2 Materials and Methods  
### Data Description  
All the datasets used in this study are binary feature datasets, which means all of the input data were binary (values of target class can be also represented as binary, but they are treated as categorical values). To enable the performance evaluation from various viewpoints, we selected public datasets with binary features (SPECT, analcatdata_fraud), a public dataset with binary features for multiclass classification (car_evaluation), biomedical datasets with large number of binary features (Methicillin-resistant _Staphylococcus Aureus_ (MRSA) pathogenicity, MRSA drug resistance, _C. difficile_ pathogenicity), and a public  
Figure 1: The flowchart of the proposed approach.  
dataset for generating a various number of samples and target class ratios through the artificial binarization of numerical features (ring).  
Three of the datasets, SPECT, analcatdata_fraud, and ring, are benchmark datasets retrieved from GitHub repository of [23]. SPECT and analcatdata_fraud are datasets for which all the input data are binary. The ring dataset's input data were originally numerical with two class labels (binary), which then were normalized and binarized using the \(k\)-means clustering algorithm of the \"Binarize\" R package. This was done to generate datasets with various degree of imbalance. ring_1500 vs3000, ring_100 vs500, ring_100 vs2000, and ring_60 vs3000 were randomly generated from the ring dataset. The same procedure was also performed by [24] in order to evaluate their models based on different degrees of imbalance due to the lack of available datasets.  
The other three datasets are biological datasets obtained at Kanazawa University Hospital. Two datasets about MRSA share basically the same feature data, which represent the existence of mutations in each strain of MRSA corresponding to each sample [25]. The main difference in the two MRSA datasets is the target class. In the MRSA pathogenicity dataset, 0 and 1 represent latent and developed, respectively. In the MRSA drug resistance dataset, the target class represents the resistance of each strain to Clindamycin (CLDM). Similarly, the _C. difficile_ pathogenicity dataset contains feature data representing the existence of mutations in each strain of _C. difficile_, which causes diarrhea in humans and poses difficulties in antibiotic treatment. To generate the feature data, the whole genomes of 77 strains were sequenced by Hiseq 2500 with 150 base reads. The reads were mapped to the reference genome NC_009089 in RefSeq (the same as AM180355.1 in GenBank) by BWA. After the mapping and file conversion by SAMtools, mutations were detected by Varscan. Among the two types of mutation, Indels and SNPs, we only used Indels (insertions and deletions). After the detection of Indels, if the feature data (existence of mutation) of two or more Indels were completely the same in 77 strains, the features were integrated as one, since such redundant features often have a harmful influence on the performance of classification by machine learning. Finally, 2610 features were generated for 77 samples, where each feature corresponded to one or more mutation. For the multiclass case, due to the difficulty in finding a benchmark dataset that met our criteria, we only used one dataset to show that our approach can also be applied to multiclass binary features datasets.  
The number of samples and other basic information of the datasets are summarized in Table 1. All the input variables of these datasets are binary, and all the target class were also binary, except for the car_evaluation dataset, which has four classes for the target class. All the features of these datasets were used in the analysis.