# Highly Imbalanced Classification of Gout Using Data Resampling and Ensemble Method
## 3 Methods
### ENaNSMOTE-Tomek Link  
Oversampling techniques, such as random repeating minority class instances or SMOTE, aim to address class imbalance by increasing the number of minority instances. SMOTE uses existing minority class data to create new synthetic samples instead of duplicating them. Minority class samples are often scarce and highly valuable. However, the nearest neighbors of minority data points may be too far or from different classes due to the limitations of k-nearest neighbors. SMOTE may discard some minority class samples, resulting in over-density of synthetic samples. To address this concern, the ENaNSMOTE technique introduces the concept of extended natural neighbors which are different from the k-nearest neighbors theory used in SMOTE. ENaNSMOTE is not limited to a specific parameter k: it searches for the extended natural neighbor of each minority sample to generate new synthetic samples. This approach ensures that the generated synthetic samples maintain a similar distribution as and characteristics of the original minority class instances. ENaNSMOTE enables a flexible and adaptive resampling process, ensuring that no valuable minority class sample is overlooked and that the resulting synthetic samples accurately represent the minority class. ENaN is an extension of NaN based on the concept of true friendship between two individuals [37]. ENaN expands on this concept by incorporating the ideas of unilateral friendship and true friendship, which are inspired by friendships in human society, referring to two people who consider each other to be friends. A natural stable structure holds if everyone has at least one true friend. If example x is one of the \(\lambda\)-nearest neighbors of example y or y is one of the \(\lambda\)-nearest neighbors of x, then x is called the extended natural neighbor of y, and vice versa. The definition of the extended natural neighbor is displayed in the following equation. Figure 2: Flowchart of the proposed approach. \[x\in ENaN(y)\Leftrightarrow x\in NN_{\lambda}(y)\cup y\in NN_{ \lambda}(x) \tag{1}\] \[\lambda=argmin_{r}(\forall r\in N^{+})(\forall y)(\exists x\
eq y),(x \in ENaN(y)) \tag{2}\]  
where \(\lambda\) is called the natural neighbor eigenvalue and is the minimum number of searches \(r\) required to build a naturally stable structure. That is, all examples (except noise) have ENaN until the number of neighbors \(r\) increases from 1 to \(\lambda\). Therefore, the value of \(\lambda\) is related to the data distribution and varies from one dataset to another. The symbols \(x\) and \(y\) denote two examples, and \(N^{+}\) denotes the set 1, 2, 3, \(\cdots\). However, it is important to note that the relationship captured by the extended natural neighbor may not be robust. Samples generated using the extended natural neighbor may potentially mislead the classifier and result in incorrect judgments. To address this concern, the proposed method combines the Tomek link algorithm to undersampling the dataset after the ENaNSMOTE oversampling step. The Tomek link algorithm evaluates each sample separately and identifies pairs of samples that are Tomek links [38]. A Tomek link is when two samples of different classes are each others' nearest neighbors. In such cases, the sample that is farther away from the decision boundary is considered the noisy sample and is subsequently removed. This removal process is repeated until no further deletions can be made, ensuring that only reliable and representative samples are retained. By combining the ENaNSMOTE and Tomek link techniques, this study create a hybrid sampling algorithm that aims to balance the dataset effectively while minimizing the introduction of noisy or irrelevant samples. This algorithm selectively oversamples the minority class using ENaN and undersamples using Tomek link to create a balanced and high-quality dataset for training a classifier. The pseudocode for the hybrid sampling algorithm that encompasses both the ENaNSMOTE and Tomek link steps is presented as Algorithm 1.