## 2 Methods
### Dissimilarity Representation  
In machine learning, an instance is traditionally represented mathematically as a vector \(\mathbf{x}=\{x_{1},x_{2},x_{3},\ldots,x_{m}\}\), where each \(x_{i}\) is an attribute or feature \(\in\mathbb{R}^{m}\) that describes a property of the instance. This feature-based representation is widely adopted; however, it has been observed that instances with different class labels could have a very similar vector generating ambiguous regions [18; 37]. This phenomenon, known as class overlap, poses a challenge in distinguishing the best class label between different classes [18]. As a solution to this problem, alternative representations have been proposed that transform or encode each instance into a new vector. In a fashion such as using kernels, [PERSON] and [PERSON] [28] propose mapping a feature vector into a dissimilarity vector using the Euclidean metric, computed between a feature vector and a representation set. The rationale for adopting the dissimilarity representation is that dissimilarity measures should be minimal for examples of the same class and significant for examples of different classes, facilitating discrimination between classes [29; 38]. Experiments by [PERSON] et al. [39] on credit scoring datasets show that dissimilarity representation provides significantly higher separability between classes than the original feature representation. In the dissimilarity representation, the attributes are defined through vectors that quantify the similarity between examples and certain elements or prototypes belonging to a designated representation set (\(R\)). This set \(R\) must include examples from all classes and can be selected using various strategies. For instance, \(R\) can be defined as the complete training set, a subset derived through a heuristic mechanism, randomly selected, or even extracted from the test dataset [38]. \(R\) was randomly formed for the experiments described in this article, ensuring an equitable representation of examples from each class in the training set. This straightforward strategy of forming \(R\) has proven effective in most problems [38]. The mapping from the original feature space to the dissimilarity space is carried out by calculating a distance metric between R and each example in the training and test sets [38]. Thus, the dimensions in the dissimilarity space are represented by distance vectors that reflect the dissimilarity between R and the examples in the feature space. In other words, if we define the representation set as\[\mathbf{R}=\{r_{1},r_{2},...,r_{k}\} \tag{2}\]  
and the training set as \(\mathbf{E}\), where \(e\) symbolizes an example within the training dataset, then any vector in the dissimilarity space can be denoted as  
\[d_{e}=[d_{p}(e,r_{1}),d_{p}(e,r_{2}),...,d_{p}(e,r_{k})] \tag{3}\]  
where \(d_{p}()\) is the dissimilarity metric. Therefore, the dissimilarity space corresponding to \(\mathbf{E}\) is defined through the dissimilarity matrix \(\mathbf{D_{E}}\), which encompasses all the dissimilarity vectors \(d_{e}\)[38]. Algorithm 1 shows the dissimilarity mapping procedure implemented in Spark. Likewise, it includes the modification for calculating the dissimilarity using fractional distances. ```
/* Input and output files are in LIBSVM format. */ /*Train and test data files in the feature space. */  Data trainDataFile,testDataFile /*/ /*minClassLabel and injClassLabel are the class labels of the minority and majority classes, respectively. The values are used to filter the classes within the algorithm. */ /*reProcess is the number of instances selected per class to conform the representation set R to transform the feature space into the dissimilarity space. An equal number of instances are selected for each class. */ /*fractionalDistance is the fractional p used to calculate the distance between samples. The value is in the range of 0 \(<\) 1.