# Dissimilarity Space Based Multi-Source Cross-Project Defect Prediction
## 2 Related Work
### Dissimilarity Representation  
Experts proposed using the pairwise dissimilarity between objects to represent the object and found that it can improve the performance of classifiers [19]. The traditional sample representation method uses feature attributes to represent a sample in the feature space. The disadvantage of this method is that the sample dimension is higher, and it is easy to cause the curse of dimensionality. The dissimilarity representation of samples can solve the problem, and the method represents a sample by calculating the dissimilarity relationship between the sample and the prototype set from the target set. The dimension of the sample is determined by the number of samples in the prototype set. Studies have shown that using the dissimilarity-based sample representation method can improve the performance of the defect prediction model. Compared with traditional modeling methods, this method can improve the performance by 1.86%-9.39% [20]. In addition, once the dissimilarity space has been constructed, many methods can be used to assign labels to unlabeled samples so that the model construction problem can be solved with a general standard supervised learning method [20].  
The dissimilarity representation method mainly includes two factors: prototype set selection and dissimilarity transformation. The representation method uses a transformation function to map samples into dissimilarity spaces according to the prototype set. The dimensions of the space are determined by the number of samples contained in the prototype set, and the difference from the _j-th_ prototype sample can be regarded as the _j-th_ attribute in the space. Each attribute of each sample in the space is the dissimilarity between the sample and the prototype sample [7].  
On the selection method of prototype set, there are many excellent methods, such as the nearest neighbor method, random selection method, and cluster-based linear programming method. The most conventional method uses random selection, but this method is uncertain and leads to information loss. Clustering algorithm can solve this problem, but the KNN usually needs to customize the \(k\) value, and cannot find all the representative samples. [PERSON] and [PERSON] [21] proposed a density peaks clustering (DPC) method which uses the density peak points of the data set to find the cluster center quickly. Therefore, this paper uses the DPC algorithm to select the representative sample as the prototype set.  
In the problem of dissimilarity transformation, it is common to use a distance-based method to measure the relationship between samples and map the sample set into a \(n\times m\) matrix, such as Euclidean distance, Mahalanobis distance, and Manhattan distance [15; 19]. However, the accuracy will be affected if the measurement units are different for the above methods. For the cosine similarity, when the angle between vectors is the obtuse angle, these two vectors are irrelevant and the cosine value is negative. So the cosine similarity is not suitable for training the prediction model. The kernel method can describe the relationship between two vectors in essence, and it is more accurate than the distance-based method. Arc-cosine [22] is one of the kernel functions, and it represents the relationship between vectors by measuring the angle between vectors. Compared with cosine similarity measurement, this method is more intuitive in representing the relationship between vectors. Compared with radial basis function (RBF), this method does not need to adjust the parameters when only expressing the difference between vectors.  
In order to improve the performance of the predictive model, the source domain dataset and the target set are used to construct the dissimilarity space, in which each sample is represented as the relationship between the source sample and the prototype set. The prototype set is obtained from the target set.