# Novel Two-Dimensional Visualization Approaches for Multivariate Centroids of Clustering Algorithms

Authors: Yunus Doğan; Feriştah Dalkılıç; Derya Birant; Recep Alp Kut; Reyat Yılmaz
Journal: Scientific Programming
 (2018)

---

## Abstract

The dimensionality reduction and visualization problems associated with multivariate centroids obtained by clustering algorithms are addressed in this paper. Two approaches are used in the literature for the solution of such problems, specifically, the self-organizing map (SOM) approach and mapping selected two features manually (MS2Fs). In addition, principle component analysis (PCA) was evaluated as a component for solving this problem on supervised datasets. Each of these traditional approaches has drawbacks: if SOM runs with a small map size, all centroids are located contiguously rather than at their original distances according to the high-dimensional structure; MS2Fs is not an efficient method because it does not take features outside of the method into account, and lastly, PCA is a supervised method and loses the most valuable feature. In this study, five novel hybrid approaches were proposed to eliminate these drawbacks by using the quantum genetic algorithm (QGA) method and four feature selection methods, Pearson’s correlation, gain ratio, information gain, and relief methods. Experimental results demonstrate that, for 14 datasets of different sizes, the prediction accuracy of the proposed weighted clustering approaches is higher than the traditional K-means++ clustering approach. Furthermore, the proposed approach combined with K-means++ and QGA shows the most efficient placements of the centroids on a two-dimensional map for all the test datasets.


---

## Body

## 1. Introduction

Human visual perception can be insufficient for the interpretation of a pattern within a multivariate (or high dimensional) structure, causing errors at the decision-making stage. In knowledge discovery processes, the same drawback is encountered in multivariate datasets because of not being able to print the dataset to a visual interface as a two-dimensional (2D) structure. Furthermore, inefficient features in a multivariate dataset negatively impact the accuracy and running performance of data analysis tasks. Therefore, the notion of dimensional reduction is of particular relevance in the preprocessing phase of data analysis. Many algorithms and methods have been proposed and developed for dimensional reduction [1], of which principal component analysis (PCA) is one of the most popular methods [2]. Regardless of popularity, neither PCA nor the other available dimensional reduction methods are suitably efficient to independently visualize all instances in the dataset because at the data preparation stage before the usage of the data-mining algorithm, PCA performs some feature selection tests separately for different dimensions. Thereafter, the optimal feature number and the optimal model are determined with respect to the variance values of these proposed models. The dataset is presented as a 2D map using PCA results in a low variance value. Another drawback of PCA is that the most valuable feature is transformed to new values [2]. As a result, PCA is not typically successful at mapping the dataset in 2D, except in image representation and facial recognition studies [3, 4]. Another difficulty is that even if a dimensional reduction is applied, the visualization of all instances in a large dataset causes storage and performance problems. To address this problem, clustering algorithms can be used for data summarization and the visualization methods applied afterwards. K-Means is the most-used clustering algorithm; however, K-means submits only the high-dimensional centroids, without any visualization and without any dimensional reduction operation.Literature records three approaches to the visualization of K-means. The first approach involves mapping for two selected features from a multivariate dataset (MS2Fs). Curman et al. have clustered the coordinate data in Vancouver using K-means and presented them on a map [5]; Cicoria et al. have clustered “Titanic Passenger Data” using K-means and printed the survival information that was the goal of the study to different 2D maps according to features [6]; an obtained binary image was clustered onto a 2D interface using K-means for face detection in a study by Hadi and Sumedang [7]; and lastly, Fang et al. implemented software to visualize a dataset according to two selected features [8]. The second approach is visualization that takes place after K-means clustering of the dataset is dimensionally reduced by PCA. Nitsche has used this type of visualization for document clustering [9], and Wagh et al. have used it for a molecular biological dataset [10]. The third approach is the visualization of the dataset clustered by K-means in conjunction with an approach like neighborhood method location in the self-organizing map (SOM) technique, used by Raabe et al. to implement a new approach to show K-means clustering with a novel technique locating the centroids on a 2D interface [11]. SOM is a successful mapping and clustering algorithm; nevertheless, it relies on the map-size parameter as the cluster number, and if it runs with a small map-size value, all centroids of the clusters are located contiguously, not at their original distances according to the high-dimensional structure.In our study, new approaches are proposed to visualize the centroids of the clusters on a 2D map, preserving the original distances in the high-dimensional structure. These different approaches are implemented as hybrid algorithms using K-means++ (an improved version of K-means), SOM++ (an improved version of SOM), and the quantum genetic algorithm (QGA). QGA was selected for use in our hybrid solutions because dimensionality reduction and visualization problems for multivariate centroids (DRV-P-MC) are also an optimization problem.The contributions of this study are threefold: first, clustering by K-means++; then, mapping the centroids onto a 2D interface using QGA; and evaluating the success of this method. A heuristic approach is proposed for DRV-P-MC, and the aim is to avoid the drawback of locating the clusters contiguously as in the traditional SOM++. Mapping the centroids onto a 2D interface using SOM++ and evaluating the success of this approach are performed to enable comparison. Second, the usage of four major feature selection methods was mentioned in the paper by De Silva and Leong [12], specifically relief, information gain, gain ratio, and correlation. The aim is to preserve the most valuable feature and to evaluate it as the X axis. Additionally, the Y axis is obtained by a weighted calculation using the coefficient values returned from these feature selection methods. This provides an alternative to PCA for generating a 2D dataset that avoids the PCA drawback of losing the most valuable feature. Then, clustering the datasets by K-means++ and mapping the centroids by these novel approaches separately onto a 2D interface are performed. Moreover, mapping the centroids onto a 2D interface using PCA and evaluating the success of this approach for comparative purposes are performed. Third, a versatile tool is implemented with the capability to select the desired file, algorithm, normalization type, distance metric, and size of the 2D map to calculate successes across six different metrics: “sum of the square error,” “precision,” “recall,” “f-measure,” “accuracy,” and “difference between multivariate and 2D structures.” These metrics are formulated in detail in Problem Definition.In literature, generally, MS2Fs has been the preferred method to manually determine the relations between features. Our tool is not only built on MS2Fs but also contains another algorithm that maps the centroids by using information gain, for comparison with our novel approaches. It assumes that theX axis is the most valuable feature, followed by the Y axis, according to information gain scores.This paper details our study in seven sections. DRV-P-MC is defined in detail in Section2; related works providing guidance on DRV-P-MC, including traditional algorithms, hybrid approaches, and the notion of dimensionality reduction, are submitted in Section 3; in Sections 4 and 5, the reorganized traditional approaches and the proposed algorithms are formulated and presented in detail; the experimental studies performed by using 14 datasets with different characteristics and their accuracy results are given in Section 6; and finally, Section 7 presents conclusions about the proposed methods.


## 2. Problem Definition

Considering that K-means++ is the major clustering algorithm used in this sort of problem, the significance of pattern visualization in decision-making is clear. However, the visualization requirement for the centroids of K-means++ uncovers the need for DRV-P-MC, since the centroids returned and the elements in them are presented by the traditional K-means++ irrespective of any relation among the centroids. The aim in solving this problem is to map the centroids onto a 2D interface by attaining the minimum difference among the multivariate centroids and their obtained 2D projections.DRV-P-MC can be summarized as obtainingE from C. To detect whether the solution E of this problem is optimal or not, ℓ must be measured as zero or a value close to zero. Two theorems and their proofs are described in this section with an illustration for the measurement of ℓ.


### 2.1. Theorem 1

In measuring the distance between two matrices likeS and T, performing the divisions of the values in S and T by the minimum distances in the matrices separately avoids the revealed numeric difference owing to the dimensional difference between E and C, and thus, a proportional balance between S and T is supplied as in (1) and (2):(1)S⟵∑i=1k∑j=i+1kSi,j=∑a=0fCi,a−Cj,a2,S⟵∑i=0k∑j=i+1kSi,j=Si,jSmi,mj,where Smi,mj is the minimum distance value in S.(2)T⟵∑i=1k∑j=i+1kTi,j=∑a=02Ei,a−Ej,a2,T⟵∑i=0k∑j=i+1kTi,j=Ti,jTmi,mj,where Tmi,mj is the minimum distance value in T.


### 2.2. Proof 1

Focusing on the optimalM, it can be observed that the distance between the most similar centroids must be located in the closest cells in M, and the smallest values must be obtained for both S and T. Moreover, in this optimal M, the other values in S and T must be obtained proportionally to their smallest values.


#### 2.2.1. Illustration

After clustering and placement operations fork = 4, f = 3, r = 6, and c = 6, assume that C = {{0.2, 0.3, 0.1}, {0.3, 0.4, 0.2}, {0.5, 0.6, 0.4}, {0.9, 0.9, 0.8}} and E = {{0, 0}, {0, 3}, {2, 2}, {5, 5}}, and M is obtained as in the following equation:(3)M=—————C3——————————————C2—————————C0——C1——.ForM, S and T matrices are obtained as the following equations:(4)S=00.10.91.1000.30.90000.50000,T=01.72.811.2002.25.30004.20000,S=0x9x11x003x9x0005x0000,T=0y1.6y6.5y001.2y3.1y0002.4y0000⇒S=01911003900050000,T=011.66.5001.23.10002.40000,where x and y∈R+, x is the minimum number in S, and y is the minimum number in T.


### 2.3. Theorem 2

To calculate the distance between two matrices containing values that are balanced with each other, traditional matrix subtraction can be used. The subtraction operations must be performed with the absolute values, like the approach in Manhattan distance, to obtain a distance value greater than or equal to zero. After the subtraction operations, aZ matrix is obtained, and the sum of all values gives the difference between these matrices as follows:(5)Z⟵∑i=1k∑j=i+1kZi,j=Si,j−Ti,j,ℓ=∑i=1k∑j=i+1kZi,j.


### 2.4. Proof 2

To compare the two instances containing numeric values using machine learning, normalization operations must be performed to supply numeric balance among the features before the usage of any distance metric like Euclidean distance or Manhattan distance. The first theorem, essentially, claims a normalization operation forS and T matrices. The second theorem claims that, with normalized values, the distance calculation can be performed by using the traditional subtraction operation.To illustrate, bothS and T have the smallest value as 1 and normalized values. The closer the E is to the optimal solution, the smaller the values in the subtraction matrix Z. Thus, ℓ can be obtained as a value close to zero. In this example, the value of ℓ is 7.4 + 5.5 + 1.8 + 5.9 + 2.6 = 23.2, as in the following equation:(6)01911003900050000−011.66.5001.23.10002.40000⇒Z=007.45.5001.85.90002.60000.


## 2.1. Theorem 1

In measuring the distance between two matrices likeS and T, performing the divisions of the values in S and T by the minimum distances in the matrices separately avoids the revealed numeric difference owing to the dimensional difference between E and C, and thus, a proportional balance between S and T is supplied as in (1) and (2):(1)S⟵∑i=1k∑j=i+1kSi,j=∑a=0fCi,a−Cj,a2,S⟵∑i=0k∑j=i+1kSi,j=Si,jSmi,mj,where Smi,mj is the minimum distance value in S.(2)T⟵∑i=1k∑j=i+1kTi,j=∑a=02Ei,a−Ej,a2,T⟵∑i=0k∑j=i+1kTi,j=Ti,jTmi,mj,where Tmi,mj is the minimum distance value in T.


## 2.2. Proof 1

Focusing on the optimalM, it can be observed that the distance between the most similar centroids must be located in the closest cells in M, and the smallest values must be obtained for both S and T. Moreover, in this optimal M, the other values in S and T must be obtained proportionally to their smallest values.


### 2.2.1. Illustration

After clustering and placement operations fork = 4, f = 3, r = 6, and c = 6, assume that C = {{0.2, 0.3, 0.1}, {0.3, 0.4, 0.2}, {0.5, 0.6, 0.4}, {0.9, 0.9, 0.8}} and E = {{0, 0}, {0, 3}, {2, 2}, {5, 5}}, and M is obtained as in the following equation:(3)M=—————C3——————————————C2—————————C0——C1——.ForM, S and T matrices are obtained as the following equations:(4)S=00.10.91.1000.30.90000.50000,T=01.72.811.2002.25.30004.20000,S=0x9x11x003x9x0005x0000,T=0y1.6y6.5y001.2y3.1y0002.4y0000⇒S=01911003900050000,T=011.66.5001.23.10002.40000,where x and y∈R+, x is the minimum number in S, and y is the minimum number in T.


## 2.2.1. Illustration

After clustering and placement operations fork = 4, f = 3, r = 6, and c = 6, assume that C = {{0.2, 0.3, 0.1}, {0.3, 0.4, 0.2}, {0.5, 0.6, 0.4}, {0.9, 0.9, 0.8}} and E = {{0, 0}, {0, 3}, {2, 2}, {5, 5}}, and M is obtained as in the following equation:(3)M=—————C3——————————————C2—————————C0——C1——.ForM, S and T matrices are obtained as the following equations:(4)S=00.10.91.1000.30.90000.50000,T=01.72.811.2002.25.30004.20000,S=0x9x11x003x9x0005x0000,T=0y1.6y6.5y001.2y3.1y0002.4y0000⇒S=01911003900050000,T=011.66.5001.23.10002.40000,where x and y∈R+, x is the minimum number in S, and y is the minimum number in T.


## 2.3. Theorem 2

To calculate the distance between two matrices containing values that are balanced with each other, traditional matrix subtraction can be used. The subtraction operations must be performed with the absolute values, like the approach in Manhattan distance, to obtain a distance value greater than or equal to zero. After the subtraction operations, aZ matrix is obtained, and the sum of all values gives the difference between these matrices as follows:(5)Z⟵∑i=1k∑j=i+1kZi,j=Si,j−Ti,j,ℓ=∑i=1k∑j=i+1kZi,j.


## 2.4. Proof 2

To compare the two instances containing numeric values using machine learning, normalization operations must be performed to supply numeric balance among the features before the usage of any distance metric like Euclidean distance or Manhattan distance. The first theorem, essentially, claims a normalization operation forS and T matrices. The second theorem claims that, with normalized values, the distance calculation can be performed by using the traditional subtraction operation.To illustrate, bothS and T have the smallest value as 1 and normalized values. The closer the E is to the optimal solution, the smaller the values in the subtraction matrix Z. Thus, ℓ can be obtained as a value close to zero. In this example, the value of ℓ is 7.4 + 5.5 + 1.8 + 5.9 + 2.6 = 23.2, as in the following equation:(6)01911003900050000−011.66.5001.23.10002.40000⇒Z=007.45.5001.85.90002.60000.


## 3. Related Works

In our study, some traditional machine learning algorithms were utilized to implement hybrid approaches: K-means++, SOM++, PCA, and QGA. In this section, these algorithms, hybrid logic, and dimensionality reduction are described, and reasons for preferences in our study are explained along with supporting literature.The K-means++ algorithm is a successful clustering algorithm, inspired by K-means, that has been used in studies across broadly different domains. For example, Zhang and Hepner have clustered a geographic area in a phenology study [13]; Sharma et al. have clustered satellite images in an astronomy study [14]; Dzikrullah et al. have clustered a passenger dataset in a study of public transportation systems [15]; Nirmala and Veni have used K-means++ to obtain an efficient hybrid method in an optimization study [16]; and lastly, Wang et al. have clustered a microcomputed tomography dataset in a medical study [17].K-means++ is consistent in that it returns the same pattern at each run. In addition, the K-means++ algorithm submits related clusters for all instances and offers the advantage of starting the cluster analysis with a good initial set of centers [18]. Conversely, it suffers the drawback of poor running performance in determining this initial set of centers, and as to find good initial centroids, it must perform k passes over the data. Therefore, it was necessary to improve K-means++ for use of large datasets, leading to the development of a more efficient parallel version of K-means++ [19]. Another study [20] addressed the problem by using a sorted dataset, which is claimed to decrease the running time. The literature also includes many studies on enhancing the accuracy or the performance of K-means++, but none on visualizing a 2D map for the clusters of this successful algorithm. Therefore, in this study, a novel approach to visualizing K-means++ clusters on a 2D map is detailed.SOM is both a clustering and a mapping algorithm, used as a visualization tool for exploratory data in different domains owing to its mapping ability [21]. Each cluster in SOM is illustrated as a neuron, and after the training process in an artificial neural network (ANN) structure, each neuron has X and Y values as a position on a map. In addition, all clusters in a SOM map are neighboring [22]. Nanda et al. used SOM for hydrological analysis [23]; Chu et al. used SOM for their climate study [24]; Voutilainen et al. clustered a gerontological medical dataset using SOM [25]; Kanzaki et al. used SOM in their radiation study to analyze the liver damage from radon, X-rays, or alcohol treatments in mice [26]; and Tsai et al. have clustered a dataset about water and fish species in an ecohydrological environment study [27].Although SOM produces a map where each neuron represents a cluster and all clusters are neighboring [21, 22], the map does not position the returned centroids adjacent to each other as 1-unit distances; in fact, these clusters must be located on farther cells of the map. In this study, a novel approach to visualize SOM mappings in 2D retaining practically original distances among clusters is detailed, using the fast version of SOM, SOM++. In SOM++, the initialization step of K-means++ is used to find the initial centroids of SOM [28].PCA is another popular machine learning method for feature selection and dimensionality reduction. Owing to its versatility, this algorithm is also used across different domains: Viani et al. used PCA to analyze channel state information (CSI) for wireless detection of passive targets [29]; Tiwari et al. analyzed solar-based organic ranking cycles for optimization using PCA [30]; Hamill et al. used PCA to sort multivariate chemistry datasets [31]; Ishiyama et al. analyzed a cytomegalovirus dataset in a medical study [32]; and Halai et al. used PCA to analyze a neuropsychological model in a psychology study [33]. PCA is used to eliminate some features for multivariate datasets before machine learning analysis, as the dataset may be large and contain some features that would make analysis efficient [34]. These unnecessary features may be identified by PCA for subsequent removal, resulting in a new dataset with new values and fewer features [2]. Essentially, this algorithm is not a clustering algorithm; however, PCA is relevant owing to its dimensionality reduction capacity; this is utilized in our study to obtain a new 2D dataset, which is then clustered using the traditional K-means++ approach.QGA is a heuristic optimization algorithm. It refers to the smallest unit storing information in a quantum computer as a quantum bit (qubit). A qubit may store a value in between the binary values of “1” or “0,” significantly decreasing running time in the determination of an optimized result [35, 36]. This contemporary optimization algorithm is in wide-spread use. Silveira et al. used QGA to implement a novel approach for ordering optimization problems [37]; Chen et al. used QGA for a path planning problem [38]; Guan and Lin implemented a system to obtain a structural optimal design for ships using QGA [39]; Ning et al. used QGA to solve a “job shop scheduling problem” in their study [40]; and Konar et al. implemented a novel QGA as a hybrid quantum-inspired genetic algorithm to solve the problem of scheduling real-time tasks in multiprocessor systems [41]. DRV-P-MC, the focus of interest in our study, is an optimization problem as well, so this algorithm’s efficient run-time performance is employed to determine suitable cluster positions on a 2D map.Hybrid approaches combine efficient parts of certain algorithms into new wholes, enhancing the accuracy and the efficiency of these algorithms, or producing novel algorithms. In literature, there are many successful hybrid data-mining approaches: Kumar et al. implemented a highly accurate optimization algorithm from the combination of a genetic algorithm with fuzzy logic and ANN [42]; Singhal and Ashraf implemented a high-performance classification algorithm from the combination of a decision tree and a genetic algorithm [43]; Hassan and Verma collected successful high-accuracy hybrid data-mining applications for the medical domain in their study [44]; Thamilselvan and Sathiaseelan reviewed hybrid data-mining algorithms for image classification [45]; Athiyaman et al. implemented a high-accuracy approach combination of association rule mining algorithms and clustering algorithms for meteorological datasets [46]; Sahay et al. proposed a high-performance hybrid data-mining approach combining apriori and K-means algorithms for cloud computing [47]; Yu et al. obtained a novel solution selection strategy using hybrid clustering algorithms [48]; Sitek and Wikarek implemented a hybrid framework for solving optimization problems and constraint satisfaction by using constraint logic programming, constraint programming, and mathematical programming [49]; Abdel-Maksoud et al. proposed a hybrid clustering technique combining K-means and fuzzy C-means algorithms to detect brain tumours with high accuracy and performance [50]; Zhu et al. implemented a novel high-performance hybrid approach containing hierarchical clustering algorithms for the structure of wireless networks [51]; Rahman and Islam combined K-means and a genetic algorithm to obtain a novel high-performance genetic algorithm [52]; and Jagtap proposed a high-accuracy technique to diagnose heart disease by combining Naïve Bayes, Multilayer Perceptron, C4.5 as a decision tree algorithm, and linear regression [53]. What we can infer from a detailed examination of these studies is that K-means and genetic algorithms, and their variants, can be adapted to other algorithms to implement a hybrid approach successfully. Moreover, the combination of K-means and genetic algorithms creates an extremely efficient and highly accurate algorithm.In data analysis, unnecessary features cause two main problems in performance and accuracy. If a dataset is large or has insignificant features, a downscaling process should be performed by a dimensionality reduction operation to enable efficient use of the analysis algorithms. In literature, many techniques related to dimensionality reduction are presented. For example, Dash et al. claimed that using PCA for dimensionality reduction causes a drawback in understanding the dataset owing to the creation of new features with new values. Furthermore, they posit that the most effective attributes are damaged. Therefore, they presented a novel approach based on an entropy measure for dimensionality reduction [54]. Bingham and Mannila used a random projection (RP) method instead of PCA for the dimensionality reduction of image and text datasets, singular value decomposition (SVD), latent semantic indexing (LSI), and discrete cosine transform, claiming that RP offers simpler calculation than the other methods and has low error rates [55]. Goh and Vidal have used k-nearest neighbor and K-means to obtain a novel method for clustering and dimensionality reduction on Riemannian manifolds [56]; Napoleon and Pavalakodi implemented a new technique using PCA and K-means for dimensionality reduction on high-dimensional datasets [57]; Samudrala et al. implemented a parallel framework to reduce the dimensions of large-scale datasets by using PCA [58]; Cunningham and Byron used PCA, factor analysis (FA), Gaussian process factor analysis, latent linear dynamical systems, and latent nonlinear dynamical systems for the dimensional reduction of human neuronal data [59]; and Demarchi et al. reduced the dimensions of the APEX (airborne prism experiment) dataset using the auto-associative neural network approach and the BandClust algorithm [60]. Boutsidis et al. implemented two different dimensional reduction approaches for K-means clustering: the first based on RP and the second based on SVD [61]. Azar and Hassanien proposed a neurofuzzy classifier method based on ANN and fuzzy logic for the dimensional reduction of medical big datasets [62]; Cohen et al. implemented a method using RP and SVD for the dimensional reduction in K-means clustering [63]; Cunningham and Ghahramani discussed PCA, FA, linear regression, Fisher’s linear discriminant analysis, linear multidimensional scaling, canonical correlations analysis, slow feature analysis, undercomplete independent component analysis, sufficient dimensionality reduction, distance metric learning, and maximum autocorrelation factors in their survey article and observed that, in particular, PCA was used and evaluated in many studies as a highly accurate analysis [1]; and Zhao et al. used 2D-PCA and 2D locality preserving projection for the 2D dimensionality reduction in their study [64]. Sharifzadeh et al. improved a PCA method as sparse supervised principal component analysis (SSPCA) to adapt PCA for dimensionality reduction of supervised datasets, claiming that the addition of the target attribute made the feature selection and dimensional reduction operations more successful [65].These studies show PCA to be the most-used method for dimensionality reduction despite reported disadvantages including the creation of new features, which may hamper the understanding of the dataset, changing the values in the most important and efficient features, and complex calculation and low performance for big datasets.In other sample clustering studies, Yu et al. proposed some distribution-based distance functions, used to measure the similarity between two sets of Gaussian distributions, in their study, and distribution-based cluster structure selection. Additionally, they implemented a framework to determine the unified cluster structure from multiple cluster structures in all data used in their study [66]. In another study by Yu and Wong, a quantization driven clustering approach was designed to obtain classes for many instances. Moreover, they proposed two different methods to improve the performance of their approach, the shrinking process, and the hierarchical structure process [67]. A study by Wang et al. proposed a local gravitation model and implemented two novel measures to discover more information among instances, a local gravitation clustering algorithm for clustering and evaluating the effectiveness of the model, and communication with local agents to attain satisfactory clustering patterns using only one parameter [68]. Yu et al. designed a framework known as the double affinity propagation driven cluster for clustering on noisy instances and integrated multiple distance functions to avoid the noise involved with using a single distance function [69].


## 4. The Reorganized Traditional Approaches

This paper assumes two ways of K-means++ clustering, the traditional usage, and a weighted usage. After normalization techniques are used to balance the dataset features and normalize the dataset, traditional K-means++ clustering is performed. This has a preprocess step to discover the initial centroids for the standard K-means. After the initialization of the centroids, K-means clustering runs using the initial centroid values. K-means++ is expressed as Algorithm1.Algorithm 1:K-means++.
Input: Number of the centroids,k
Output: Set of the final centroids,C
Begin
v≔ Randomly selected element in I
V: Set of the initial centroids
Y: Set of the distances between v and the closest element to v in V
y: Length of Y
Addv into V
Add the distance betweenv and the closest element to v in V, into Y
Repeat
Fori = 1 : y
U ≔ U + Yi2
u ≔ A random real number between 0 and U
p ≔ 2
Repeat
U ′≔ 0
Fori = 1 : p − 1
U ′≔ U′ + Yi2
p ≔ p + 1
UntilU ≥ u > U′
AddIp−1 into V
Add the distance betweenIp−1 and the closest element to Ip−1 in V, into Y
UntilV has k centroids
Run the standard K-means withV
ReturnC returned from the standard K-means
EndIn this study, three reorganized traditional mapping approaches were implemented to visualize the centroids of K-means++ returned by Algorithm1: mapping by SOM++, by PCA, and according to the best two features determined by information gain. These three algorithms are the approaches that were implemented previously in the literature. To compare these approaches with the other five proposed algorithms under the same conditions, the former three algorithms are appropriately reorganized and implemented in this study and formulated in the following manner.


### 4.1. K-Means++ and Mapping by SOM++ (KS)

The best-known mapping algorithm is SOM, and in this study, SOM++ was implemented as the improved version of SOM, providing the centroids generated by K-means++ as the initial weights for SOM to solve DRV-P-MC. In this approach, the traditional K-means++ clustering runs first and then returns the centroids to be mapped. The SOM++ algorithm trains the weights of the neurons on its map by using the Gaussian function as the update function, as in (7). After a specific number of iterations, the weight values reach a trained-value state according to the centroids. To map the centroids, the winning neurons with the nearest distance for all centroids separately are calculated, and the weight values of these winning neurons are converted to the multivariate values of the related centroids, as in (8). Finally, M, containing the pure multivariate values of the centroids as the weight values, is returned.Let us assume thatC is obtained by Algorithm 1, θ is the closest cell in M for each element in C, d is the minimum distance between the current instances, and Cc and θ, and for each neighbor of θ, is computed, as in the following equation:(7)h=exp−d22σ2,ω⟵∑i=1fωi=ωi+h∗η∗Cc,i−ωi,where α is the neighborhood width parameter, η is the learning rate parameter, h is the neighbourhood function, and ω is the set of weight values in each cell in M.(8)∑i=1k∑j=1fWCi,j=Ci,j,where WC is the set of the winner cells for each element in C.


### 4.2. K-Means++ and Mapping by PCA (KP)

The next approach implemented in this study to map the centroids of K-means++ incorporates evaluated PCA. In this approach, once again the traditional K-means++ clustering runs first and then returns the centroids to be mapped. The PCA algorithm is a supervised learning algorithm; therefore, the dataset cannot be used by PCA without a target attribute. In the next step, to enable the use of PCA, another dataset was created with all the features in the original version and an extra attribute to function as the target attribute. This new attribute is filled for each instance according to the obtained centroids, by calculating the distances among the instances and these centroids. Finally, PCA calculates two components by using this new dataset and considering the target attribute, and a 2D structure is attained to map the centroids onM. This approach is formulated in the following expressions.Let us assume thatC is obtained by Algorithm 1, Ω computed by C is the set of the clusters of the instances in I, and I′ is a new set of the instances with a new attribute created as the target by filling it with Ω.Let us assume that, for matrixL, Lx and Ly are the result matrices, as shown in the following equations, respectively:(9)Lx=L∗LT,Ly=LT∗L.An alternative way of computingLy is as in the following equation:(10)EVx=L∗EVy∗EL1/2,Ly=EVy∗EL∗EVyT,L⟵∑i=1nIi′−µ,Ly⟵∑i=1nLT∗L,where EL is the same positive eigenvalue of Lx and Ly, EVx is the eigenvectors of Lx, EVy is the eigenvectors of Ly, and μ is the mean vector of the instances in I.I
PCA is the 2D dataset computed by PCA as in the following equation:(11)IPCA=U2T∗L,where U2 = [u1, u2] is the set of the two first components for the 2D structure.In the next expressions, the aim is to obtain 2D centroids equivalent to their multivariate structure. Therefore, firstly, the means of two new features of the instances in the same cluster are calculated for each cluster and each feature separately. Let us assume that Ω is valid for the 2D instances inIPCA, and CPCA is calculated as 2D centroids as in the following equation:(12)CPCA⟵∑i=1n∑j=12CPCAΩi,j=CPCAΩi,j+IPCAi,j,CPCA⟵∑i=1k∑j=12CPCAi,j=CPCAi,jn.Moreover, the map has the number of its column between 0 andc and the number of its row between 0 and r, and PCA returns two features as decimal numbers. Therefore, secondly, an operation for normalization must be implemented to place these centroids on the map having c × r dimensions. Thus, these decimal numbers shift their integer equivalents by using the min-max normalization technique. The centroids can then be placed on the c × r map. Finally M, in which the centroids in E are mapped, is obtained as in the following equation:(13)E⟵∑i=1k∑j=12Ei,j=CPCAi,j−minj∗cmaxj−minj,where NC1 is the set of the first column values in CPCA, NC2 is the set of the second column values in CPCA, minNC1 is the minimum value in NC1, maxNC1 is the maximum value in NC1, minNC2 is the minimum value in NC2, and maxNC2 is the maximum value in NC2.


### 4.3. K-Means++ and Mapping according to the Best Two Features Determined by Information Gain (B2FM)

The third approach, mapping the centroids by information gain according to the best two features, is formulated in the following expressions. Firstly, K-means++ runs, and the centroids are obtained. The aim in this approach is to evaluate only the most valuable features for mapping; therefore, the information gain method is used, computed to determine the root feature by decision tree algorithms. Two features having the highest information gain scores are considered as theX axis and the Y axis of the map. The information gain method is a supervised learning algorithm, and it needs a target attribute like PCA. For this reason, in the second step of this approach, a new dataset with the target attribute is created by evaluation of the distances between all centroids and all instances. Thus, the information gain method can use this new dataset and obtain the scores for each feature. At the end of this approach, the values in these features in the centroids shift their integer equivalents between 0 and c and between 0 and r by using the min-max normalization technique. Finally, the centroids are placed on the c x r map.Let us assume thatC is obtained by Algorithm 1, Ω computed by C is the set of the clusters of the instances in I, I′ is a new set of the instances using a new attribute as the target (by filling it with Ω), IG is obtained by information gain feature selection method with I′, expressed in (23), fc is the highest ranked feature in IG, and FC is the set of the values in the fcth feature in C as in (14); sc is the second highest ranked feature in IG, and SC is the set of the values in the scth feature in C, as shown in the following equations:(14)FC⟵∑i=1kCi,fc,(15)SC⟵∑i=1kCi,sc.Finally,M, where the centroids in E are mapped, is obtained as in the following equation:(16)E⟵∑i=1k∑j=12Ei,j=CPCAi,j−minj∗cmaxj−minj,where minfc is the minimum value in FC, maxfc is the maximum value in FC, minfc is the minimum value in FC, and maxfc is the maximum value in FC.


## 4.1. K-Means++ and Mapping by SOM++ (KS)

The best-known mapping algorithm is SOM, and in this study, SOM++ was implemented as the improved version of SOM, providing the centroids generated by K-means++ as the initial weights for SOM to solve DRV-P-MC. In this approach, the traditional K-means++ clustering runs first and then returns the centroids to be mapped. The SOM++ algorithm trains the weights of the neurons on its map by using the Gaussian function as the update function, as in (7). After a specific number of iterations, the weight values reach a trained-value state according to the centroids. To map the centroids, the winning neurons with the nearest distance for all centroids separately are calculated, and the weight values of these winning neurons are converted to the multivariate values of the related centroids, as in (8). Finally, M, containing the pure multivariate values of the centroids as the weight values, is returned.Let us assume thatC is obtained by Algorithm 1, θ is the closest cell in M for each element in C, d is the minimum distance between the current instances, and Cc and θ, and for each neighbor of θ, is computed, as in the following equation:(7)h=exp−d22σ2,ω⟵∑i=1fωi=ωi+h∗η∗Cc,i−ωi,where α is the neighborhood width parameter, η is the learning rate parameter, h is the neighbourhood function, and ω is the set of weight values in each cell in M.(8)∑i=1k∑j=1fWCi,j=Ci,j,where WC is the set of the winner cells for each element in C.


## 4.2. K-Means++ and Mapping by PCA (KP)

The next approach implemented in this study to map the centroids of K-means++ incorporates evaluated PCA. In this approach, once again the traditional K-means++ clustering runs first and then returns the centroids to be mapped. The PCA algorithm is a supervised learning algorithm; therefore, the dataset cannot be used by PCA without a target attribute. In the next step, to enable the use of PCA, another dataset was created with all the features in the original version and an extra attribute to function as the target attribute. This new attribute is filled for each instance according to the obtained centroids, by calculating the distances among the instances and these centroids. Finally, PCA calculates two components by using this new dataset and considering the target attribute, and a 2D structure is attained to map the centroids onM. This approach is formulated in the following expressions.Let us assume thatC is obtained by Algorithm 1, Ω computed by C is the set of the clusters of the instances in I, and I′ is a new set of the instances with a new attribute created as the target by filling it with Ω.Let us assume that, for matrixL, Lx and Ly are the result matrices, as shown in the following equations, respectively:(9)Lx=L∗LT,Ly=LT∗L.An alternative way of computingLy is as in the following equation:(10)EVx=L∗EVy∗EL1/2,Ly=EVy∗EL∗EVyT,L⟵∑i=1nIi′−µ,Ly⟵∑i=1nLT∗L,where EL is the same positive eigenvalue of Lx and Ly, EVx is the eigenvectors of Lx, EVy is the eigenvectors of Ly, and μ is the mean vector of the instances in I.I
PCA is the 2D dataset computed by PCA as in the following equation:(11)IPCA=U2T∗L,where U2 = [u1, u2] is the set of the two first components for the 2D structure.In the next expressions, the aim is to obtain 2D centroids equivalent to their multivariate structure. Therefore, firstly, the means of two new features of the instances in the same cluster are calculated for each cluster and each feature separately. Let us assume that Ω is valid for the 2D instances inIPCA, and CPCA is calculated as 2D centroids as in the following equation:(12)CPCA⟵∑i=1n∑j=12CPCAΩi,j=CPCAΩi,j+IPCAi,j,CPCA⟵∑i=1k∑j=12CPCAi,j=CPCAi,jn.Moreover, the map has the number of its column between 0 andc and the number of its row between 0 and r, and PCA returns two features as decimal numbers. Therefore, secondly, an operation for normalization must be implemented to place these centroids on the map having c × r dimensions. Thus, these decimal numbers shift their integer equivalents by using the min-max normalization technique. The centroids can then be placed on the c × r map. Finally M, in which the centroids in E are mapped, is obtained as in the following equation:(13)E⟵∑i=1k∑j=12Ei,j=CPCAi,j−minj∗cmaxj−minj,where NC1 is the set of the first column values in CPCA, NC2 is the set of the second column values in CPCA, minNC1 is the minimum value in NC1, maxNC1 is the maximum value in NC1, minNC2 is the minimum value in NC2, and maxNC2 is the maximum value in NC2.


## 4.3. K-Means++ and Mapping according to the Best Two Features Determined by Information Gain (B2FM)

The third approach, mapping the centroids by information gain according to the best two features, is formulated in the following expressions. Firstly, K-means++ runs, and the centroids are obtained. The aim in this approach is to evaluate only the most valuable features for mapping; therefore, the information gain method is used, computed to determine the root feature by decision tree algorithms. Two features having the highest information gain scores are considered as theX axis and the Y axis of the map. The information gain method is a supervised learning algorithm, and it needs a target attribute like PCA. For this reason, in the second step of this approach, a new dataset with the target attribute is created by evaluation of the distances between all centroids and all instances. Thus, the information gain method can use this new dataset and obtain the scores for each feature. At the end of this approach, the values in these features in the centroids shift their integer equivalents between 0 and c and between 0 and r by using the min-max normalization technique. Finally, the centroids are placed on the c x r map.Let us assume thatC is obtained by Algorithm 1, Ω computed by C is the set of the clusters of the instances in I, I′ is a new set of the instances using a new attribute as the target (by filling it with Ω), IG is obtained by information gain feature selection method with I′, expressed in (23), fc is the highest ranked feature in IG, and FC is the set of the values in the fcth feature in C as in (14); sc is the second highest ranked feature in IG, and SC is the set of the values in the scth feature in C, as shown in the following equations:(14)FC⟵∑i=1kCi,fc,(15)SC⟵∑i=1kCi,sc.Finally,M, where the centroids in E are mapped, is obtained as in the following equation:(16)E⟵∑i=1k∑j=12Ei,j=CPCAi,j−minj∗cmaxj−minj,where minfc is the minimum value in FC, maxfc is the maximum value in FC, minfc is the minimum value in FC, and maxfc is the maximum value in FC.


## 5. The Proposed Approaches

The five approaches proposed in this study are K-means++ using QGA mapping and weighted K-Means++ using mapping by Pearson’s correlation, gain ratio, information gain, and relief feature selection methods. These five approaches are implemented in the study and formulated in the following manner.


### 5.1. K-Means++ and Mapping by QGA (KQ)

The first proposed approach in our study uses QGA to map the centroids of K-means++. Solving DRV-P-MC can be considered as a heuristic approach becausek numbers of centroids are tried for placement on a c − r dimensional map, meaning that there are (c∗r)∗(c∗r − 1)∗(c∗r − 2)∗(c∗r − 3)∗⋯∗(c∗r − k + 1) probabilities. Therefore, this problem resembles the well-known “Travelling Salesmen” optimization problem. Given the large number of probabilities, the fittest map pattern can be attained by an optimization algorithm. In this study, QGA, the improved version of genetic algorithms, is used. In QGA, the chromosomes represent the 2D map matrix, M, and the genes in the chromosomes represent the cells in M. Moreover, each gene in QGA has a substructure named “qubit” with 2 components α and β; α represents the probability of the existence of the evaluated centroid for the current cell, and β represents the probability of the absence of the evaluated centroid for the current cell. This multicontrol mechanism helps QGA achieve high performance for a large search space.The first operation is initialization of each qubit (α, β) with 1/2 in genes identically. In the second step, the aim is to check the probabilities of placing the centroids into the cells separately and to obtain the map in which all centroids are placed, as a candidate map. These operations are performed by the makeOperator() method using a randomization technique containing three random numbers. Two of them specify the column and the row, and the third determines the cell of the current centroid [36]. The fitness function in this approach calculates the differences between E and C, which is described in detail in Problem Definition. Therefore, the value returned by the fitness function is ideally approximately zero. QGA has a generation number as a parameter, and if this generation number of iterations completes, the best individual with the lowest fitness function value is assumed as the fittest map. If not, QGA needs another assistant method called updateOperator().Let us assume that rc is the random column number attained by random [0,c), rr is the random row number attained by random [0, r), rn is the random number attained by random [0, 1), and M′ returned by makeOperator() is computed as in the following equation:(17)M′⟵∑i=1r∑j=cMi,j′=0,M′⟵∑i=1kMrc,rr′=i,rn>αrc,rr2,i,it=0,obtainnewrcandrrnumbers,decreaseit,andforthecurrenti,continuetocontrol,otherwise..The updateOperator() method updates all qubits in the individuals in the population according to the best individual, to approximate its angularity using a trigonometric approach. Firstly, this method needs a subfunction called the sign function, sf, to obtain a score between 0 and 1 according to the distance between the fitness function values of the best individual and the individual being evaluated. After that, this sf value is evaluated in a lookup table containing a condition list to determine the angle [36].Let us assume that ff is the value of the fitness function; BS is the best individual in the previous population according to ff(BS); CS is the current individual in the current population according to ff(CS); bv is a gene value obtained by makeOperator() for BS; cv is a gene value obtained by makeOperator() for CS;α′ and β′ are the previous values of α and β for CS; sf is the sign function, and its value is extracted according to the conditions list as in (18); ∆∂ is the orientation of rotation angle to update the qubit values as in (19); and α and β are updated for each gene in each chromosome in QM as in (20). Finally, QM with new qubit values is returned by updateOperator():(18)sfα′,β′=+1,α′∗β′∗ffBS−ffCS<0,−1,α′∗β′∗ffBS−ffCS>0,±1,α′=0andbv−cv∗ffBS−ffCS<0,±1,β′=0andbv−cv∗ffBS−ffCS>0,0,otherwise,(19)Δ∂=0.025π,ffBS≥ffCSandcv=1andα′=0andβ′=−1andsfα′,β′=±1,0.005π,ffBS<ffCSandcv=1andbv=1andα′=0andβ′=−1andsfα′,β′=+1,0.01π,ffBS<ffCSandcv=1andbv=0andα′=±1andβ′=+1andsfα′,β′=+1,0.05π,ffBS≥ffCSandcv=0andbv=1andα′=±1andβ′=+1andsfα′,β′=−1,0,otherwise,(20)αβ=cosΔ∂−sinΔ∂sinΔ∂cosΔ∂∗α′β′.The calling of the makeOperator() and updateOperator() methods continues until the generation number is reached. After completing the iterations, the fittest map is returned by the algorithm as given in Algorithm2.Algorithm 2:K-means++ and mapping by QGA.
Input: Number of the centroids,k, iteration number (it)
Output: Map withC placed, M
Begin
QM: Population containing individual qubit matrices
PM: Population containing individual probability matrices
qm: Length of QM
pm: Length of PM
tr ≔ 0
C: Set of the centroids returned by Algorithm 1
Repeat
Fora = 1 : qm
Fori = 1 : c
Forj = 1 : r
QM ·αa,i,j  ≔  1/√2
QM ·βa,i,j ≔ 1/√2
Fora = 1 : pm
makeOperator(it, PMa)
QM = updateOperator(QM)
tr ≔ tr + 1
Until tr = it
ReturnM having the fittest value
End


### 5.2. Weighted K-Means++ and Mapping by Feature Selection Methods

Literature indicates that when the supervised analysis of a dataset involves many features, insignificant features can negatively affect the results of the analysis. Therefore, feature selection methods are used to eliminate some features according to their degrees of influence over the class attribute. In the next proposed approaches, all features can be considered as being determined by theX and Y axes without any elimination and with losing the most valuable feature, unlike in PCA, even if 2D mapping needs only two dimensions. Indeed, the aims of these approaches are to keep the most valuable feature and to assume it to be the X axis and in addition, to evaluate other all features in a weighted manner as the Y axis. As a result, these approaches use four feature selection methods to determine the efficiencies of the features separately: Pearson’s correlation, gain ratio, information gain, and relief. In these proposed approaches, the centroids obtained by the traditional K-means++ clustering are not evaluated in their pure form but are converted to their weighted values according to the scores returned by the feature selection methods.In Algorithm3, the weighted K-means++ clustering is expressed. Firstly, the values of the features in all instances are multiplied by the weight values, and a new set of the instances is attained. Finally, these transformed instances are used by the traditional K-means++ clustering, and the more qualified centroids are returned by this method. The efficiency and the success of the weighted clustering approach are detailed in [70].Algorithm 3:The weighted K-means++ clustering.
Input: Set of the weight values for all features (W)
Output: Set of the final centroids,C
Begin
Fori = 1 : n
Forj = 1 : f
Ii,j=Ii,j∗Wj
Call Algorithm1 for I to cluster with K-means++
ReturnC returned by Algorithm 1
End


#### 5.2.1. Weighted K-Means++ and Mapping by Pearson’s Correlation (WMC)

In all approaches in this study, unsupervised analyses are the focus; therefore, to use feature selection methods, which are supervised learning algorithms, firstly, the traditional K-means++ clustering is implemented, and a new dataset with the clusters returned is created. The correlation coefficient values are formulated in the following expressions, for all features can be calculated with this dataset; thus, these values are evaluated by weighted K-means++ clustering, and the centroids that are returned can be placed on the 2D map.Let us assume that CC is the set of the correlation coefficient values between all features and the target attribute as in the following equation:(21)CC⟵∑i=1fn∗∑j=1nIij∗tj−∑j=1nIij∗∑j=1ntjn∗∑j=1nIij2−∑j=1nIij2∗n∗∑j=1ntj2−∑j=1ntj2,CC⟵∑i=1fCCi=CCimincc,mincc>0>0,maxccCCimaxcc<0,CCi−minccmaxcc−mincc∗0.9+0.1,else,where mincc is the minimum value in CC and maxcc is the maximum value in CC.Algorithm4, formulated to preserve the most valuable feature determined by Pearson’s correlation, gives a detailed presentation of the weighted mapping of the centroids on the 2D map. In this method, the values in the most valuable feature and the weighted averaged values in the other features in the centroids shift their integer equivalents between 0 and c, and between 0 and r, by using the min-max normalization technique. Finally, M is returned.Algorithm 4:The weighted K-means++ and mapping by Pearson's correlation.
Input: Number of the centroids,k
Output: Map withC placed, M
Begin
C′: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 1
Ω: Set of the clusters of the instances inI, computed by C′
I′: Set of the instances, with a new attribute as the target by filling it with Ω,
CC: Set of the weight values obtained by Pearson’s correlation feature selection method
C: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 3
fc: The highest ranked feature in CC
FC: Set of the values in the fcth feature inC
wc: Sum of the scores in the features except the fcth feature
WC: Set of the average of the values in the other features
Fori = 1 : k
FCi = Ci,fc
Fori = 1 : k
Forj = 1 : f
Ifj is not equal to fc
WCi = WCi + Ci,j
Fori = 1 : f
Ifj is not equal to fc
wc = wc + CCi
Fori = 1 : k
WCi = WCi/wc
minfc: The minimum value is in FC
maxfc: The maximum value is in FC
minwc: The minimum value is in WC
maxwc: The maximum value is in WC
Fori = 1 : k
Forj = 1 : f
Ei,j = [Ci,j − minj]∗c/(maxj − minj)
ReturnM where the centroids in E are mapped
End


#### 5.2.2. Weighted K-Means++ and Mapping by Gain Ratio (WMG)

In Algorithm5, the weighted K-means++ using gain ratio feature selection and weighted mapping by preserving the most valuable feature are formulated. The same operations as in Algorithm 4 are implemented in this proposed approach, except the calculation of the weight values. The weight values are obtained by the gain ratio feature selection method in this approach. In addition, owing to the different weight values from the correlation coefficient values, centroids with different multivariate feature values are computed in this mapping method.Algorithm 5:The weighted K-means++ and mapping by gain ratio.
Input: Number of the centroids,k
Output: Map withC placed, M
Begin
C′: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 1
Ω: Set of the clusters of the instances inI, computed by C′
I′: Set of the instances, with a new attribute as the target by filling it with Ω
GC: Set of the weight values obtained by gain ratio feature selection method
C: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 3
fc: The highest ranked feature in GR
FC: Set of the values in the fcth feature inC
wc: Sum of the scores in the features except the fcth feature
WC: Set of the average of the values in the other features
Fori = 1 : k
FCi = Ci,fc
Fori = 1 : k
Forj = 1 : f
Ifj is not equal to fc
WCi = WCi + Ci, j
Fori = 1 : f
Ifj is not equal to fc
wc = wc + GRi
Fori = 1 : k
WCi = WCi/wc
minfc: The minimum value is in FC
maxfc: The maximum value is in FC
minwc: The minimum value is in WC
maxwc: The maximum value is in WC
Fori = 1 : k
Forj = 1 : f
Ei,j = [Ci,j − minj]∗c/(maxj − minj)
ReturnM where the centroids in E are mapped
EndLet us assume thatBi represents the ith category in t, PBi is the probability of the ith category, Gj represents the jth category in a feature, PGi is the probability of the jth category, PBiGj is the conditional probability of the ith category given that term Gj appeared, and GR is the set of the gain ratio values between all features and the target attribute, as shown in the following equation:(22)GR⟵−∑i=1bPBilogPBi+∑i=1b∑j=1gPGi∑i=1bPBiGjlogPBiGj−∑j=1gPGilogPGi,GR⟵∑i=1fGRi=GRimingr,mingr>0,maxgrGRi,maxgr<0,GRi−mingrmaxgr−mingr∗0.9+0.1,otherwise,where mingr is the minimum value in GR and maxgr is the maximum value in GR.


#### 5.2.3. Weighted K-Means++ and Mapping by Information Gain (WMI)

In Algorithm5, the weighted K-means++ using information gain feature selection and weighted mapping by preserving the most valuable feature is formulated. The same operations are implemented as in the previous approach, except the calculation of the weight values. The weight values are obtained by the information gain feature selection method in this approach. Furthermore, because of the different weight values from gain ratio values, centroids with different multivariate feature values are computed in this mapping method (Algorithm 6).Algorithm 6:The weighted K-means++ and mapping by information gain.
Input: Number of the centroids,k
Output: Map withC placed, M
Begin
C′: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 1
Ω: Set of the clusters of the instances inI, computed by C′
I′: Set of the instances, with a new attribute as the target by filling it with Ω
IG: Set of the weight values obtained by information gain feature selection method
C: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 3
fc: The highest ranked feature in IG
FC: Set of the values in the fcth feature inC
wc: Sum of the scores in the features except the fcth feature
WC: Set of the average of the values in the other features
Fori = 1 : k
FCi = Ci,fc
Fori = 1 : k
Forj = 1 : f
Ifj is not equal to fc
WCi = WCi + Ci,j
Fori = 1 : f
Ifj is not equal to fc
wc = wc + IGi
Fori = 1 : k
WCi = WCi/wc
minfc: The minimum value is in FC
maxfc: The maximum value is in FC
minwc: The minimum value is in WC
maxwc: The maximum value is in WC
Fori = 1 : k
Forj = 1 : f
Ei,j = [Ci,j − minj]∗c/(maxj − minj)
ReturnM where the centroids in E are mapped
EndLet us assume thatBi represents the ith category in t, and PBi is the probability of the ith category; Gj represents the jth category in a feature, and Gj is the probability of the jth category; PBiGj is the conditional probability of the ith category given that term Gj appeared, and IG is the set of the information gain values between all features and the target attribute:(23)IG⟵−∑i=1bPBilogPBi+∑i=1b∑j=1gPGi∑i=1bPBiGjlogPBiGj,IG⟵∑i=1fIGi=IGiminIG,minIG>0,maxIGIGi,maxIG<0,IGi−minIGmaxIG−minIG∗0.9+0.1,else,where minIG is the minimum value in IG and maxIG is the maximum value in IG.


#### 5.2.4. Weighted K-Means++ and Mapping by Relief (WMR)

In Algorithm7, the weighted K-means++ using relief feature selection and weighted mapping by preserving the most valuable feature is formulated. The same operations as in the previous approach are implemented, except the calculation of the weight values. The weight values are obtained by the relief feature selection method in this approach. Moreover, because of the different weight values from information gain values centroids with different multivariate feature values are computed in this mapping method. Let us assume that R is a random instance from D, Ih is the closest instance to R in the same class where R exists, Im is the closest instance to R in another class where R does not exist, and RF is the set of the relief feature values between all features and the target attribute in the following equation:(24)RF⟵∑i=1fRFi=0,RF⟵∑i=1n∑j=1fRFj=RFj−Ihj−Ri+Imj−Ri,RF⟵∑i=1fRFi=RFminrf,minrf>0,maxrfRFi,maxrf<0,RFi−minrfmaxrf−minrf∗0.9+0.1,else,where minrf is the minimum value in RF and maxrf is the maximum value in RF.Algorithm 7:The weighted K-means++ and mapping by relief.
Input: Number of the centroids,k
Output: Map withC placed, M
Begin
C′ :  Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 1
Ω :  Set of the clusters of the instances inI, computed by C′
I′ :  Set of the instances, with a new attribute as the target by filling it with Ω
RF :  Set of the weight values obtained by information gain feature selection method
C :  Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 3
fc :  The highest ranked feature in RF
FC :  Set of the values in the fcth feature inC
wc :  Sum of the scores in the features except the fcth feature
WC :  Set of the average of the values in the other features
Fori = 1 : k
FCi = Ci,fc
Fori = 1 : k
Forj = 1 : f
Ifj is not equal to fc
WCi = WCi + Ci,j
Fori = 1 : f
Ifj is not equal to fc
wc = wc + RFi
Fori = 1 : k
WCi = WCi/wc
minfc: The minimum value is in FC
maxfc: The maximum value is in FC
minwc: The minimum value is in WC
maxwc: The maximum value is in WC
Fori = 1 : k
Forj = 1 : f
Ei,j= [Ci,j - minj] ∗ c/(maxj - minj)
ReturnM where the centroids in E are mapped
End


## 5.1. K-Means++ and Mapping by QGA (KQ)

The first proposed approach in our study uses QGA to map the centroids of K-means++. Solving DRV-P-MC can be considered as a heuristic approach becausek numbers of centroids are tried for placement on a c − r dimensional map, meaning that there are (c∗r)∗(c∗r − 1)∗(c∗r − 2)∗(c∗r − 3)∗⋯∗(c∗r − k + 1) probabilities. Therefore, this problem resembles the well-known “Travelling Salesmen” optimization problem. Given the large number of probabilities, the fittest map pattern can be attained by an optimization algorithm. In this study, QGA, the improved version of genetic algorithms, is used. In QGA, the chromosomes represent the 2D map matrix, M, and the genes in the chromosomes represent the cells in M. Moreover, each gene in QGA has a substructure named “qubit” with 2 components α and β; α represents the probability of the existence of the evaluated centroid for the current cell, and β represents the probability of the absence of the evaluated centroid for the current cell. This multicontrol mechanism helps QGA achieve high performance for a large search space.The first operation is initialization of each qubit (α, β) with 1/2 in genes identically. In the second step, the aim is to check the probabilities of placing the centroids into the cells separately and to obtain the map in which all centroids are placed, as a candidate map. These operations are performed by the makeOperator() method using a randomization technique containing three random numbers. Two of them specify the column and the row, and the third determines the cell of the current centroid [36]. The fitness function in this approach calculates the differences between E and C, which is described in detail in Problem Definition. Therefore, the value returned by the fitness function is ideally approximately zero. QGA has a generation number as a parameter, and if this generation number of iterations completes, the best individual with the lowest fitness function value is assumed as the fittest map. If not, QGA needs another assistant method called updateOperator().Let us assume that rc is the random column number attained by random [0,c), rr is the random row number attained by random [0, r), rn is the random number attained by random [0, 1), and M′ returned by makeOperator() is computed as in the following equation:(17)M′⟵∑i=1r∑j=cMi,j′=0,M′⟵∑i=1kMrc,rr′=i,rn>αrc,rr2,i,it=0,obtainnewrcandrrnumbers,decreaseit,andforthecurrenti,continuetocontrol,otherwise..The updateOperator() method updates all qubits in the individuals in the population according to the best individual, to approximate its angularity using a trigonometric approach. Firstly, this method needs a subfunction called the sign function, sf, to obtain a score between 0 and 1 according to the distance between the fitness function values of the best individual and the individual being evaluated. After that, this sf value is evaluated in a lookup table containing a condition list to determine the angle [36].Let us assume that ff is the value of the fitness function; BS is the best individual in the previous population according to ff(BS); CS is the current individual in the current population according to ff(CS); bv is a gene value obtained by makeOperator() for BS; cv is a gene value obtained by makeOperator() for CS;α′ and β′ are the previous values of α and β for CS; sf is the sign function, and its value is extracted according to the conditions list as in (18); ∆∂ is the orientation of rotation angle to update the qubit values as in (19); and α and β are updated for each gene in each chromosome in QM as in (20). Finally, QM with new qubit values is returned by updateOperator():(18)sfα′,β′=+1,α′∗β′∗ffBS−ffCS<0,−1,α′∗β′∗ffBS−ffCS>0,±1,α′=0andbv−cv∗ffBS−ffCS<0,±1,β′=0andbv−cv∗ffBS−ffCS>0,0,otherwise,(19)Δ∂=0.025π,ffBS≥ffCSandcv=1andα′=0andβ′=−1andsfα′,β′=±1,0.005π,ffBS<ffCSandcv=1andbv=1andα′=0andβ′=−1andsfα′,β′=+1,0.01π,ffBS<ffCSandcv=1andbv=0andα′=±1andβ′=+1andsfα′,β′=+1,0.05π,ffBS≥ffCSandcv=0andbv=1andα′=±1andβ′=+1andsfα′,β′=−1,0,otherwise,(20)αβ=cosΔ∂−sinΔ∂sinΔ∂cosΔ∂∗α′β′.The calling of the makeOperator() and updateOperator() methods continues until the generation number is reached. After completing the iterations, the fittest map is returned by the algorithm as given in Algorithm2.Algorithm 2:K-means++ and mapping by QGA.
Input: Number of the centroids,k, iteration number (it)
Output: Map withC placed, M
Begin
QM: Population containing individual qubit matrices
PM: Population containing individual probability matrices
qm: Length of QM
pm: Length of PM
tr ≔ 0
C: Set of the centroids returned by Algorithm 1
Repeat
Fora = 1 : qm
Fori = 1 : c
Forj = 1 : r
QM ·αa,i,j  ≔  1/√2
QM ·βa,i,j ≔ 1/√2
Fora = 1 : pm
makeOperator(it, PMa)
QM = updateOperator(QM)
tr ≔ tr + 1
Until tr = it
ReturnM having the fittest value
End


## 5.2. Weighted K-Means++ and Mapping by Feature Selection Methods

Literature indicates that when the supervised analysis of a dataset involves many features, insignificant features can negatively affect the results of the analysis. Therefore, feature selection methods are used to eliminate some features according to their degrees of influence over the class attribute. In the next proposed approaches, all features can be considered as being determined by theX and Y axes without any elimination and with losing the most valuable feature, unlike in PCA, even if 2D mapping needs only two dimensions. Indeed, the aims of these approaches are to keep the most valuable feature and to assume it to be the X axis and in addition, to evaluate other all features in a weighted manner as the Y axis. As a result, these approaches use four feature selection methods to determine the efficiencies of the features separately: Pearson’s correlation, gain ratio, information gain, and relief. In these proposed approaches, the centroids obtained by the traditional K-means++ clustering are not evaluated in their pure form but are converted to their weighted values according to the scores returned by the feature selection methods.In Algorithm3, the weighted K-means++ clustering is expressed. Firstly, the values of the features in all instances are multiplied by the weight values, and a new set of the instances is attained. Finally, these transformed instances are used by the traditional K-means++ clustering, and the more qualified centroids are returned by this method. The efficiency and the success of the weighted clustering approach are detailed in [70].Algorithm 3:The weighted K-means++ clustering.
Input: Set of the weight values for all features (W)
Output: Set of the final centroids,C
Begin
Fori = 1 : n
Forj = 1 : f
Ii,j=Ii,j∗Wj
Call Algorithm1 for I to cluster with K-means++
ReturnC returned by Algorithm 1
End


### 5.2.1. Weighted K-Means++ and Mapping by Pearson’s Correlation (WMC)

In all approaches in this study, unsupervised analyses are the focus; therefore, to use feature selection methods, which are supervised learning algorithms, firstly, the traditional K-means++ clustering is implemented, and a new dataset with the clusters returned is created. The correlation coefficient values are formulated in the following expressions, for all features can be calculated with this dataset; thus, these values are evaluated by weighted K-means++ clustering, and the centroids that are returned can be placed on the 2D map.Let us assume that CC is the set of the correlation coefficient values between all features and the target attribute as in the following equation:(21)CC⟵∑i=1fn∗∑j=1nIij∗tj−∑j=1nIij∗∑j=1ntjn∗∑j=1nIij2−∑j=1nIij2∗n∗∑j=1ntj2−∑j=1ntj2,CC⟵∑i=1fCCi=CCimincc,mincc>0>0,maxccCCimaxcc<0,CCi−minccmaxcc−mincc∗0.9+0.1,else,where mincc is the minimum value in CC and maxcc is the maximum value in CC.Algorithm4, formulated to preserve the most valuable feature determined by Pearson’s correlation, gives a detailed presentation of the weighted mapping of the centroids on the 2D map. In this method, the values in the most valuable feature and the weighted averaged values in the other features in the centroids shift their integer equivalents between 0 and c, and between 0 and r, by using the min-max normalization technique. Finally, M is returned.Algorithm 4:The weighted K-means++ and mapping by Pearson's correlation.
Input: Number of the centroids,k
Output: Map withC placed, M
Begin
C′: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 1
Ω: Set of the clusters of the instances inI, computed by C′
I′: Set of the instances, with a new attribute as the target by filling it with Ω,
CC: Set of the weight values obtained by Pearson’s correlation feature selection method
C: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 3
fc: The highest ranked feature in CC
FC: Set of the values in the fcth feature inC
wc: Sum of the scores in the features except the fcth feature
WC: Set of the average of the values in the other features
Fori = 1 : k
FCi = Ci,fc
Fori = 1 : k
Forj = 1 : f
Ifj is not equal to fc
WCi = WCi + Ci,j
Fori = 1 : f
Ifj is not equal to fc
wc = wc + CCi
Fori = 1 : k
WCi = WCi/wc
minfc: The minimum value is in FC
maxfc: The maximum value is in FC
minwc: The minimum value is in WC
maxwc: The maximum value is in WC
Fori = 1 : k
Forj = 1 : f
Ei,j = [Ci,j − minj]∗c/(maxj − minj)
ReturnM where the centroids in E are mapped
End


### 5.2.2. Weighted K-Means++ and Mapping by Gain Ratio (WMG)

In Algorithm5, the weighted K-means++ using gain ratio feature selection and weighted mapping by preserving the most valuable feature are formulated. The same operations as in Algorithm 4 are implemented in this proposed approach, except the calculation of the weight values. The weight values are obtained by the gain ratio feature selection method in this approach. In addition, owing to the different weight values from the correlation coefficient values, centroids with different multivariate feature values are computed in this mapping method.Algorithm 5:The weighted K-means++ and mapping by gain ratio.
Input: Number of the centroids,k
Output: Map withC placed, M
Begin
C′: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 1
Ω: Set of the clusters of the instances inI, computed by C′
I′: Set of the instances, with a new attribute as the target by filling it with Ω
GC: Set of the weight values obtained by gain ratio feature selection method
C: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 3
fc: The highest ranked feature in GR
FC: Set of the values in the fcth feature inC
wc: Sum of the scores in the features except the fcth feature
WC: Set of the average of the values in the other features
Fori = 1 : k
FCi = Ci,fc
Fori = 1 : k
Forj = 1 : f
Ifj is not equal to fc
WCi = WCi + Ci, j
Fori = 1 : f
Ifj is not equal to fc
wc = wc + GRi
Fori = 1 : k
WCi = WCi/wc
minfc: The minimum value is in FC
maxfc: The maximum value is in FC
minwc: The minimum value is in WC
maxwc: The maximum value is in WC
Fori = 1 : k
Forj = 1 : f
Ei,j = [Ci,j − minj]∗c/(maxj − minj)
ReturnM where the centroids in E are mapped
EndLet us assume thatBi represents the ith category in t, PBi is the probability of the ith category, Gj represents the jth category in a feature, PGi is the probability of the jth category, PBiGj is the conditional probability of the ith category given that term Gj appeared, and GR is the set of the gain ratio values between all features and the target attribute, as shown in the following equation:(22)GR⟵−∑i=1bPBilogPBi+∑i=1b∑j=1gPGi∑i=1bPBiGjlogPBiGj−∑j=1gPGilogPGi,GR⟵∑i=1fGRi=GRimingr,mingr>0,maxgrGRi,maxgr<0,GRi−mingrmaxgr−mingr∗0.9+0.1,otherwise,where mingr is the minimum value in GR and maxgr is the maximum value in GR.


### 5.2.3. Weighted K-Means++ and Mapping by Information Gain (WMI)

In Algorithm5, the weighted K-means++ using information gain feature selection and weighted mapping by preserving the most valuable feature is formulated. The same operations are implemented as in the previous approach, except the calculation of the weight values. The weight values are obtained by the information gain feature selection method in this approach. Furthermore, because of the different weight values from gain ratio values, centroids with different multivariate feature values are computed in this mapping method (Algorithm 6).Algorithm 6:The weighted K-means++ and mapping by information gain.
Input: Number of the centroids,k
Output: Map withC placed, M
Begin
C′: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 1
Ω: Set of the clusters of the instances inI, computed by C′
I′: Set of the instances, with a new attribute as the target by filling it with Ω
IG: Set of the weight values obtained by information gain feature selection method
C: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 3
fc: The highest ranked feature in IG
FC: Set of the values in the fcth feature inC
wc: Sum of the scores in the features except the fcth feature
WC: Set of the average of the values in the other features
Fori = 1 : k
FCi = Ci,fc
Fori = 1 : k
Forj = 1 : f
Ifj is not equal to fc
WCi = WCi + Ci,j
Fori = 1 : f
Ifj is not equal to fc
wc = wc + IGi
Fori = 1 : k
WCi = WCi/wc
minfc: The minimum value is in FC
maxfc: The maximum value is in FC
minwc: The minimum value is in WC
maxwc: The maximum value is in WC
Fori = 1 : k
Forj = 1 : f
Ei,j = [Ci,j − minj]∗c/(maxj − minj)
ReturnM where the centroids in E are mapped
EndLet us assume thatBi represents the ith category in t, and PBi is the probability of the ith category; Gj represents the jth category in a feature, and Gj is the probability of the jth category; PBiGj is the conditional probability of the ith category given that term Gj appeared, and IG is the set of the information gain values between all features and the target attribute:(23)IG⟵−∑i=1bPBilogPBi+∑i=1b∑j=1gPGi∑i=1bPBiGjlogPBiGj,IG⟵∑i=1fIGi=IGiminIG,minIG>0,maxIGIGi,maxIG<0,IGi−minIGmaxIG−minIG∗0.9+0.1,else,where minIG is the minimum value in IG and maxIG is the maximum value in IG.


### 5.2.4. Weighted K-Means++ and Mapping by Relief (WMR)

In Algorithm7, the weighted K-means++ using relief feature selection and weighted mapping by preserving the most valuable feature is formulated. The same operations as in the previous approach are implemented, except the calculation of the weight values. The weight values are obtained by the relief feature selection method in this approach. Moreover, because of the different weight values from information gain values centroids with different multivariate feature values are computed in this mapping method. Let us assume that R is a random instance from D, Ih is the closest instance to R in the same class where R exists, Im is the closest instance to R in another class where R does not exist, and RF is the set of the relief feature values between all features and the target attribute in the following equation:(24)RF⟵∑i=1fRFi=0,RF⟵∑i=1n∑j=1fRFj=RFj−Ihj−Ri+Imj−Ri,RF⟵∑i=1fRFi=RFminrf,minrf>0,maxrfRFi,maxrf<0,RFi−minrfmaxrf−minrf∗0.9+0.1,else,where minrf is the minimum value in RF and maxrf is the maximum value in RF.Algorithm 7:The weighted K-means++ and mapping by relief.
Input: Number of the centroids,k
Output: Map withC placed, M
Begin
C′ :  Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 1
Ω :  Set of the clusters of the instances inI, computed by C′
I′ :  Set of the instances, with a new attribute as the target by filling it with Ω
RF :  Set of the weight values obtained by information gain feature selection method
C :  Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 3
fc :  The highest ranked feature in RF
FC :  Set of the values in the fcth feature inC
wc :  Sum of the scores in the features except the fcth feature
WC :  Set of the average of the values in the other features
Fori = 1 : k
FCi = Ci,fc
Fori = 1 : k
Forj = 1 : f
Ifj is not equal to fc
WCi = WCi + Ci,j
Fori = 1 : f
Ifj is not equal to fc
wc = wc + RFi
Fori = 1 : k
WCi = WCi/wc
minfc: The minimum value is in FC
maxfc: The maximum value is in FC
minwc: The minimum value is in WC
maxwc: The maximum value is in WC
Fori = 1 : k
Forj = 1 : f
Ei,j= [Ci,j - minj] ∗ c/(maxj - minj)
ReturnM where the centroids in E are mapped
End


## 5.2.1. Weighted K-Means++ and Mapping by Pearson’s Correlation (WMC)

In all approaches in this study, unsupervised analyses are the focus; therefore, to use feature selection methods, which are supervised learning algorithms, firstly, the traditional K-means++ clustering is implemented, and a new dataset with the clusters returned is created. The correlation coefficient values are formulated in the following expressions, for all features can be calculated with this dataset; thus, these values are evaluated by weighted K-means++ clustering, and the centroids that are returned can be placed on the 2D map.Let us assume that CC is the set of the correlation coefficient values between all features and the target attribute as in the following equation:(21)CC⟵∑i=1fn∗∑j=1nIij∗tj−∑j=1nIij∗∑j=1ntjn∗∑j=1nIij2−∑j=1nIij2∗n∗∑j=1ntj2−∑j=1ntj2,CC⟵∑i=1fCCi=CCimincc,mincc>0>0,maxccCCimaxcc<0,CCi−minccmaxcc−mincc∗0.9+0.1,else,where mincc is the minimum value in CC and maxcc is the maximum value in CC.Algorithm4, formulated to preserve the most valuable feature determined by Pearson’s correlation, gives a detailed presentation of the weighted mapping of the centroids on the 2D map. In this method, the values in the most valuable feature and the weighted averaged values in the other features in the centroids shift their integer equivalents between 0 and c, and between 0 and r, by using the min-max normalization technique. Finally, M is returned.Algorithm 4:The weighted K-means++ and mapping by Pearson's correlation.
Input: Number of the centroids,k
Output: Map withC placed, M
Begin
C′: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 1
Ω: Set of the clusters of the instances inI, computed by C′
I′: Set of the instances, with a new attribute as the target by filling it with Ω,
CC: Set of the weight values obtained by Pearson’s correlation feature selection method
C: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 3
fc: The highest ranked feature in CC
FC: Set of the values in the fcth feature inC
wc: Sum of the scores in the features except the fcth feature
WC: Set of the average of the values in the other features
Fori = 1 : k
FCi = Ci,fc
Fori = 1 : k
Forj = 1 : f
Ifj is not equal to fc
WCi = WCi + Ci,j
Fori = 1 : f
Ifj is not equal to fc
wc = wc + CCi
Fori = 1 : k
WCi = WCi/wc
minfc: The minimum value is in FC
maxfc: The maximum value is in FC
minwc: The minimum value is in WC
maxwc: The maximum value is in WC
Fori = 1 : k
Forj = 1 : f
Ei,j = [Ci,j − minj]∗c/(maxj − minj)
ReturnM where the centroids in E are mapped
End


## 5.2.2. Weighted K-Means++ and Mapping by Gain Ratio (WMG)

In Algorithm5, the weighted K-means++ using gain ratio feature selection and weighted mapping by preserving the most valuable feature are formulated. The same operations as in Algorithm 4 are implemented in this proposed approach, except the calculation of the weight values. The weight values are obtained by the gain ratio feature selection method in this approach. In addition, owing to the different weight values from the correlation coefficient values, centroids with different multivariate feature values are computed in this mapping method.Algorithm 5:The weighted K-means++ and mapping by gain ratio.
Input: Number of the centroids,k
Output: Map withC placed, M
Begin
C′: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 1
Ω: Set of the clusters of the instances inI, computed by C′
I′: Set of the instances, with a new attribute as the target by filling it with Ω
GC: Set of the weight values obtained by gain ratio feature selection method
C: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 3
fc: The highest ranked feature in GR
FC: Set of the values in the fcth feature inC
wc: Sum of the scores in the features except the fcth feature
WC: Set of the average of the values in the other features
Fori = 1 : k
FCi = Ci,fc
Fori = 1 : k
Forj = 1 : f
Ifj is not equal to fc
WCi = WCi + Ci, j
Fori = 1 : f
Ifj is not equal to fc
wc = wc + GRi
Fori = 1 : k
WCi = WCi/wc
minfc: The minimum value is in FC
maxfc: The maximum value is in FC
minwc: The minimum value is in WC
maxwc: The maximum value is in WC
Fori = 1 : k
Forj = 1 : f
Ei,j = [Ci,j − minj]∗c/(maxj − minj)
ReturnM where the centroids in E are mapped
EndLet us assume thatBi represents the ith category in t, PBi is the probability of the ith category, Gj represents the jth category in a feature, PGi is the probability of the jth category, PBiGj is the conditional probability of the ith category given that term Gj appeared, and GR is the set of the gain ratio values between all features and the target attribute, as shown in the following equation:(22)GR⟵−∑i=1bPBilogPBi+∑i=1b∑j=1gPGi∑i=1bPBiGjlogPBiGj−∑j=1gPGilogPGi,GR⟵∑i=1fGRi=GRimingr,mingr>0,maxgrGRi,maxgr<0,GRi−mingrmaxgr−mingr∗0.9+0.1,otherwise,where mingr is the minimum value in GR and maxgr is the maximum value in GR.


## 5.2.3. Weighted K-Means++ and Mapping by Information Gain (WMI)

In Algorithm5, the weighted K-means++ using information gain feature selection and weighted mapping by preserving the most valuable feature is formulated. The same operations are implemented as in the previous approach, except the calculation of the weight values. The weight values are obtained by the information gain feature selection method in this approach. Furthermore, because of the different weight values from gain ratio values, centroids with different multivariate feature values are computed in this mapping method (Algorithm 6).Algorithm 6:The weighted K-means++ and mapping by information gain.
Input: Number of the centroids,k
Output: Map withC placed, M
Begin
C′: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 1
Ω: Set of the clusters of the instances inI, computed by C′
I′: Set of the instances, with a new attribute as the target by filling it with Ω
IG: Set of the weight values obtained by information gain feature selection method
C: Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 3
fc: The highest ranked feature in IG
FC: Set of the values in the fcth feature inC
wc: Sum of the scores in the features except the fcth feature
WC: Set of the average of the values in the other features
Fori = 1 : k
FCi = Ci,fc
Fori = 1 : k
Forj = 1 : f
Ifj is not equal to fc
WCi = WCi + Ci,j
Fori = 1 : f
Ifj is not equal to fc
wc = wc + IGi
Fori = 1 : k
WCi = WCi/wc
minfc: The minimum value is in FC
maxfc: The maximum value is in FC
minwc: The minimum value is in WC
maxwc: The maximum value is in WC
Fori = 1 : k
Forj = 1 : f
Ei,j = [Ci,j − minj]∗c/(maxj − minj)
ReturnM where the centroids in E are mapped
EndLet us assume thatBi represents the ith category in t, and PBi is the probability of the ith category; Gj represents the jth category in a feature, and Gj is the probability of the jth category; PBiGj is the conditional probability of the ith category given that term Gj appeared, and IG is the set of the information gain values between all features and the target attribute:(23)IG⟵−∑i=1bPBilogPBi+∑i=1b∑j=1gPGi∑i=1bPBiGjlogPBiGj,IG⟵∑i=1fIGi=IGiminIG,minIG>0,maxIGIGi,maxIG<0,IGi−minIGmaxIG−minIG∗0.9+0.1,else,where minIG is the minimum value in IG and maxIG is the maximum value in IG.


## 5.2.4. Weighted K-Means++ and Mapping by Relief (WMR)

In Algorithm7, the weighted K-means++ using relief feature selection and weighted mapping by preserving the most valuable feature is formulated. The same operations as in the previous approach are implemented, except the calculation of the weight values. The weight values are obtained by the relief feature selection method in this approach. Moreover, because of the different weight values from information gain values centroids with different multivariate feature values are computed in this mapping method. Let us assume that R is a random instance from D, Ih is the closest instance to R in the same class where R exists, Im is the closest instance to R in another class where R does not exist, and RF is the set of the relief feature values between all features and the target attribute in the following equation:(24)RF⟵∑i=1fRFi=0,RF⟵∑i=1n∑j=1fRFj=RFj−Ihj−Ri+Imj−Ri,RF⟵∑i=1fRFi=RFminrf,minrf>0,maxrfRFi,maxrf<0,RFi−minrfmaxrf−minrf∗0.9+0.1,else,where minrf is the minimum value in RF and maxrf is the maximum value in RF.Algorithm 7:The weighted K-means++ and mapping by relief.
Input: Number of the centroids,k
Output: Map withC placed, M
Begin
C′ :  Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 1
Ω :  Set of the clusters of the instances inI, computed by C′
I′ :  Set of the instances, with a new attribute as the target by filling it with Ω
RF :  Set of the weight values obtained by information gain feature selection method
C :  Set of the centroids obtained by the traditional K-means++ clustering in Algorithm 3
fc :  The highest ranked feature in RF
FC :  Set of the values in the fcth feature inC
wc :  Sum of the scores in the features except the fcth feature
WC :  Set of the average of the values in the other features
Fori = 1 : k
FCi = Ci,fc
Fori = 1 : k
Forj = 1 : f
Ifj is not equal to fc
WCi = WCi + Ci,j
Fori = 1 : f
Ifj is not equal to fc
wc = wc + RFi
Fori = 1 : k
WCi = WCi/wc
minfc: The minimum value is in FC
maxfc: The maximum value is in FC
minwc: The minimum value is in WC
maxwc: The maximum value is in WC
Fori = 1 : k
Forj = 1 : f
Ei,j= [Ci,j - minj] ∗ c/(maxj - minj)
ReturnM where the centroids in E are mapped
End


## 6. Experimental Results and Discussions

Accuracy, consistency, and compatibility tests are implemented in the study. The accuracy tests involve measurements of precision, recall,f-measure, and accuracy. Consistency tests involve calculation of the sum of squared error (SSE). Compatibility tests consider the difference between multivariate and 2D structures (DBM2). This section details the implementation of the tests on the proposed and traditional algorithms on 14 datasets of various sizes and comparison of the test results. For the measurement of the relevant metrics for these processes, a versatile tool, whose interface is shown in Figure 1, was developed as a desktop application on Visual Studio 2017 using the WEKA data-mining software package for background operations [71]. To implement this tool, programming aspects included the development of pseudocode (fragments were given in Section 4 and Section 5), with consideration of mainly object-oriented programming concepts, leading to the placement of each algorithm as a class structure within the application. Finally, C# was selected as a programming language, in which sorted lists were implemented as data structures.Figure 1
An interface of the tool after clustering.The test tool was developed with the capability to select the desired file, algorithm, size of the 2D map, normalization type, and distance metric. Aside from the algorithms, the options are 2D map sizes from 2 × 2 to 20 × 20, Euclidean (25), Manhattan (26), or Chebyshev (27) distance metrics, and four normalization types, specifically min-max (28), z-score (29), decimal scaling (30), and division by maximum value methods (31):(25)di,j=∑a=1fIi,a−Ij,a2,(26)di,j=∑a=1fIi,a−Ij,a,(27)di,j=max∑a=1fIi,a−Ij,a,where di,j is the distance between the ith and jth instances.(28)NV=FV−FVminFVmax−FVmin∗NVmax−NVmin+NVmin,(29)NV=FV−µб,(30)NV=FV10τ,(31)NV=FVNVmax,where FV is the current value, NV is the normalized value of FV, FVmin is the minimum value in the current feature (F), FVmax is the maximum value in F, NVmax is the new maximum value in F, NVmin is the new minimum value in F, µ is the mean of the values in F, б is the standard deviation value in F, and τ is lowest integer value such that max (|NV|) < 1.


### 6.1. Dataset Description

The datasets used in our study are listed in Table1 together with their characteristics. They are open-source datasets, from the UCI machine learning repository, and are the same datasets used in previous studies in the literature containing supervised analyses because of their class attributes.Table 1
The datasets with their types, existence of missing values, and sizes.
Datasets
Type
Instances
Features
Classes
Missing values
Blocks Classification
Numeric
5473
10
5
No
Cardiac Arrhythmia Database
Numeric
452
278
16
Yes
Column 3C Weka
Numeric
310
6
3
No
Glass Identification Database
Numeric
214
9
7
No
Heart Statlog
Numeric
270
13
2
No
Iris Plants Database
Numeric
150
4
3
No
Johns Hopkins University Ionosphere Database
Numeric
351
34
2
No
Optical Recognition of Handwritten Digits
Numeric
5620
64
10
No
Pima Indians Diabetes Database
Numeric
768
8
2
No
Protein Localization Sites
Numeric
336
7
8
No
Vowel Context Data
Numeric
990
11
11
No
Waveform Database Generator
Numeric
5000
40
3
No
Wine Recognition Data
Numeric
178
13
3
No
Wisconsin Breast Cancer
Numeric
699
9
2
Yes


### 6.2. Validation Metrics

To verify the accuracy of the algorithms, blind versions of these datasets were created in the experimental studies, and the results of the precision (Pr), recall (Re), f-measure (Fm), and accuracy (Ac) tests were generated by means of matches between the desired and proposed classes. The Pr, Re, Fm, and Ac test results in this section were calculated using min-max normalization between 0 and 1 and using the Euclidean distance metric owing to this being generally used for K-means++ clustering in literature. In addition, the clustering operations were performed according to the original class numbers of the datasets, in order to be able to compare the desired classes with the proposed clusters.In Table2, the Ac, Fm, Re, and Pr values, which were computed by the standard K-means++ clustering, and the weighted K-means++ clustering with Pearson's correlation, gain ratio, information gain, and relief features selection methods are given. They are presented separately as percentages for 14 datasets in Table 2. The Ac, Fm, Re, and Pr values can be computed as follows, respectively:(32)Ac=Tp+TnTp+Tn+Fp+Fn,(33)Fm=2∗Pr∗RePr+Re,(34)Re=TpTp+Tn,(35)Pr=TpTp+Fp,where Tp is the true-positive value, Tn is the true-negative value, Fp is the false-positive value, and Fn is the false-negative value.Table 2
TheAc, Fm, Re, and Pr values (%) calculated separately for 14 datasets and the standard and the weighted K-means++ clustering approaches.
Datasets
Standard
Correlation
Gain ratio
Info gain
Relief
Blocks Classification
A
c
94.81
95.13∗
94.93∗
95.12∗
95.13∗
F
m
95.37
95.59∗
95.45∗
95.58∗
95.59∗
R
e
96.86
96.95∗
96.89∗
96.95∗
96.95∗
P
r
92.69
92.03
94.44∗
94.81∗
94.45
Cardiac Arrhythmia Database
A
c
97.64
98.08∗
96.91
97.66∗
95.85
F
m
94.35
95.97∗
93.22
93.77
90.67
R
e
96.07
96.60∗
94.69
95.44
93.28
P
r
92.69
95.35∗
91.79
92.15
88.21
Column 3C Weka
A
c
85.77
84.73
84.29
86.81∗
83.81
F
m
79.79
81.03
80.46
83.58∗
79.86
R
e
80.24
81.42
80.93
83.95∗
80.37
P
r
79.35
80.64
80.00
83.22∗
79.35
Glass Identification Database
A
c
81.05
75.39
77.62
81.55∗
75.57
F
m
56.85
51.55
50.49
58.48∗
48.10
R
e
79.85
56.54
66.47
79.99∗
55.27
P
r
44.13
47.38∗
40.70
46.09∗
42.57
Heart Statlog
A
c
69.20
73.61∗
73.61∗
73.61∗
73.61∗
F
m
74.16
77.19∗
77.19∗
77.19∗
77.19∗
R
e
75.81
78.11∗
78.11∗
78.11∗
78.11∗
P
r
72.59
72.59
72.22
86.29∗
80.74∗
Iris Plants Database
A
c
91.97
95.98∗
96.87∗
96.87∗
97.32∗
F
m
88.01
94.00∗
95.33∗
95.33∗
97.32∗
R
e
88.03
94.01∗
95.33∗
95.33∗
96.04∗
P
r
88.00
94.00∗
95.33∗
95.33∗
96.00∗
Johns Hopkins University Ionosphere Database
A
c
67.22
67.17
67.56∗
68.21∗
67.17
F
m
73.60
73.55
73.85∗
74.30∗
73.55
R
e
78.58
78.46
78.77∗
79.05∗
78.46
P
r
69.23
69.23
69.51∗
70.08∗
69.23
Optical Recognition of Handwritten Digits
A
c
84.51
84.52∗
86.17∗
85.47∗
84.50
F
m
19.68
19.54
31.97∗
26.03∗
19.49
R
e
25.15
24.56
41.63∗
33.02∗
24.59
P
r
16.17
16.23∗
25.95∗
21.48∗
16.14
Pima Indians Diabetes Database
A
c
77.77
77.77
77.51
78.01∗
77.10
F
m
80.98
80.98
80.81
81.10∗
80.53
R
e
83.31
83.31
83.26
83.27
83.10
P
r
78.77
78.77
78.51
79.03∗
78.12
Protein Localization Sites
A
c
92.38
92.05
95.30∗
91.75
91.85
F
m
79.44
78.44
88.61∗
78.01
77.37
R
e
81.63
80.66
90.06∗
79.28
79.86
P
r
77.38
76.33
87.20∗
76.78
75.03
Vowel Context Data
A
c
88.48
88.81∗
88.68∗
88.77∗
87.75
F
m
42.26
43.49∗
41.30
41.96
35.87
R
e
53.06
54.95∗
49.54
53.97∗
43.59
P
r
35.11
35.99∗
35.41∗
34.33
30.48
Waveform Database Generator
A
c
83.26
83.24
83.38∗
83.17
83.09
F
m
79.41
79.39
79.54∗
79.32
79.23
R
e
82.67
82.66
82.80∗
82.65
82.54
P
r
76.40
76.38
76.54∗
76.26
76.18
Wine Recognition Data
A
c
96.39
94.77
95.94
97.48∗
97.51∗
F
m
95.14
92.85
94.45
96.36∗
96.40
R
e
95.35
93.01
94.53
96.65∗
96.75∗
P
r
94.94
92.69
94.38
96.06
96.06
Wisconsin Breast Cancer
A
c
71.69
72.43∗
72.58∗
72.58∗
72.58∗
F
m
77.19
77.69∗
77.79∗
77.79∗
77.79∗
R
e
82.48
82.71∗
82.76∗
82.76∗
82.76∗
P
r
72.53
73.24∗
73.39∗
73.39∗
73.39∗
∗The Ac, Fm, Re, and Pr values (%) higher than the standard approach.To verify the consistency of the centroids, the measurements for SSE analyses were implemented in this experimental study. The SSE values for 14 datasets using Euclidean, Manhattan, and Chebyshev distance metrics to see the variances for each metric were computed separately. SSE is computed as in the following equation:(36)SSE=∑i=1k∑j=1fCi,j−Ii,j″2,where Ii′ is the set of the closest instances in I to Ci.Finally, for compatibility testing, the differences between multivariate and 2D structures of the centroids as ℓ were measured as detailed in Problem Definition. The ℓ value is expected to be zero or approximately zero. Resultant ℓ values were evaluated separately in terms of the traditional (KS, KP, and B2FM) and the proposed (KQ, WMC, WMG, WMI, and WMR) approaches. The results shown in Figure2 were obtained on 10 datasets having more than 2 classes because it was observed that all approaches could map the 2 centroids of the other 4 datasets (Heart Statlog, Johns Hopkins University Ionosphere Database, Pima Indians Diabetes Database, and Wisconsin breast cancer) on the furthest edges on the map, and consequently, the ℓ values were computed as 0, that is, the most optimal value that can be obtained.Figure 2
The ℓ values for 8 algorithms and 10 datasets having more than 2 classes.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)


### 6.3. Experimental Results

The results of accuracy tests show generally that information gain is the most successful clustering approach as it has higherAc values for 12 datasets than is standard in comparison with the other approaches. Gain ratio has higher accuracy values than standard for 9 datasets, correlation has higher accuracy for 7 datasets, and relief has higher accuracy for 5 datasets. Considering Fm values, information gain has higher values than standard for 10 datasets, gain ratio has higher values for 8 datasets, correlation has higher values for 6 datasets, and relief has higher values for 4 datasets. With respect to Re, information gain has higher values then standard for 10 datasets, gain ratio has higher values for 8 datasets, correlation has higher values for 6 datasets, and relief has higher values 5 for datasets. Finally, regarding Pr values, info gain has higher percentage values for 9 datasets than standard; gain ratio has higher values for 8 datasets, correlation has higher values for 6 datasets, and relief has higher values for 3 datasets. These results support the conclusion that weighted K-means++ clustering with feature selection methods, particularly information gain, provides more accurate centroids than traditional K-means++ clustering.The values in Table3 were obtained by calculating the means of the Ac, Fm, Re, and Pr values in Table 2 for 14 datasets. The results in this table demonstrate that the weighted clustering approaches help to increase the accuracy of the clustering algorithms. In addition, information gain is shown to be the most efficient feature selection method for clustering operations, as it has the highest values for the means of the Ac, Fm, Re, and Pr values. Across 14 datasets, the average of the Ac values of information gain (Ac¯) is 85.50%, whereas the standard value is 84.43%; the average of Fm values of information gain (Fm¯) is 76.05%, whereas the standard value is 74.01%; the average of Re values for information gain (Re¯) is 80.03%, whereas the standard value is 78.50%; and the average of Pr values for information gain (Pr¯) is 73.23%, whereas the standard value is 70.71%. Gain ratio and correlation techniques also have higher average values than standard; however, it is observed that relief cannot obtain higher average values than standard for all measurements (specifically, Fm¯ and Re¯ values are lower).Table 3
The means of theAc, Fm, Re, and Pr values (%) for 14 datasets and the standard and the weighted K-means++ clustering approaches.
Means
Standard
Correlation
Gain ratio
Info gain
Relief
A
c
¯
84.43
84.54∗
85.09∗
85.50∗∗
84.48∗
F
m
¯
74.01
74.37∗
75.32∗
76.05∗∗
73.49
R
e
¯
78.50
77.42∗
79.69∗
80.03∗∗
76.54
P
r
¯
70.71
71.48∗
72.52∗
73.23∗∗
71.13∗
∗The Ac, Fm, Re and Pr values (%) higher than the standard approach. ∗∗The highest means of Ac, Fm, Re, and Pr values (%).As a result, the values in Tables2 and 3 support the claim that the most successful approach for determination of the weights of the features is weighted K-means++ clustering with information gain. Furthermore, in comparison with the other feature selection methods, relief is not efficient for determining the weights.Traditional K-means++ clustering and four weighted K-means++ clustering approaches incorporating feature selection methods were compared in this analysis. The number of clusters for each dataset was assumed to be the original class number. The SSE values in Figure3 show that distance metrics do not affect them significantly, whereas it can be seen clearly that all weighted clustering approaches incorporating feature selection methods produce fewer errors than traditional clustering for all datasets. Moreover, the weighted clustering decreased the SSE values by a large proportion, with information gain reducing SSE by 33% for the “Blocks Classification” dataset; relief reducing SSE by 75% for the “Cardiac Arrhythmia Database” dataset; gain ratio reducing SSE by 45% for the “Column 3C Weka” dataset; relief reducing SSE by 67% for the “Glass Identification Database” dataset; gain ratio, information gain, and relief reducing SSE by 73% for the “Heart Statlog” dataset; gain ratio and relief reducing SSE by 35% for the “Iris Plants Database” dataset; gain ratio reducing SSE by 54% for the “Johns Hopkins University Ionosphere Database” dataset; gain ratio reducing SSE by 34% for the “Optical Recognition of Handwritten Digits” dataset; relief reducing SSE by 56% for the “Pima Indians Diabetes Database” dataset; gain ratio reducing SSE by 42% for the “Protein localization sites” dataset; relief reducing SSE by 77% for the “Vowel Context Data” dataset; information gain reducing SSE by 51% for the “Waveform Database Generator” dataset; information gain reducing SSE by 47% for the “Wine Recognition Data” dataset; and relief reducing SSE by 76% for the “Wisconsin Breast Cancer” dataset. In particular, relief, gain ratio, and information gain are better than the other approaches in decreasing errors. Moreover, relief is the most successful approach to reducing SSE in proportion to its accuracy results.Figure 3
The SSE values that were obtained by using Euclidean, Manhattan, and Chebyshev distance measurements for 14 datasets: (a) Blocks Classification; (b) Cardiac Arrhythmia Database; (c) Column 3C Weka; (d) Glass Identification Database; (e) Heart Statlog; (f) Iris Plants Database; (g) Johns Hopkins University Ionosphere Database; (h) Optical Recognition of Handwritten Digits; (i) Pima Indians Diabetes Database; (j) Protein Localization Sites; (k) Vowel Context Data; (l) Waveform Database Generator; (m) Wine Recognition Data; (n) Wisconsin Breast Cancer.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
(n)In Figure 2, the approaches are compared with each other separately for each dataset, revealing that KS, KP, and B2FM have generally higher differences than the other proposed approaches. However, because the ℓ values were obtained between different ranges for each dataset the ℓ values were normalized between 0 and 100 for each dataset, the average of each was calculated, and the results were obtained as the percentage value to enable clear comparison (Table4). Finally, compatibility values were computed as 40% for KS, 50% for KP, and 39% for B2FM, while much higher values of 96% for KQ, 65% for WMC, 80% for WMG, 79% for WMI, and 69% for WMR were computed.Table 4
The compatibility results (%) on 10 datasets for the traditional and the proposed approaches.
KS
KP
B2FM
KQ
WMC
WMG
WMI
WMR
40
50
37
96∗
65
80
79
69
∗The highest compatibility result (%).The results support the claim that KQ is the most compatible approach, achieving 96% for all datasets. Additionally, the weighted approaches for KS, KP, and B2FM are more compatible than the traditional approaches. Furthermore, WMG and WMI have higher compatible values than the other weighted approaches, WMC and WMR. As a result, because B2FM has a 37% compatibility result, besides two most valuable features, it can be claimed that the other features have high mapping efficiency, as well.


## 6.1. Dataset Description

The datasets used in our study are listed in Table1 together with their characteristics. They are open-source datasets, from the UCI machine learning repository, and are the same datasets used in previous studies in the literature containing supervised analyses because of their class attributes.Table 1
The datasets with their types, existence of missing values, and sizes.
Datasets
Type
Instances
Features
Classes
Missing values
Blocks Classification
Numeric
5473
10
5
No
Cardiac Arrhythmia Database
Numeric
452
278
16
Yes
Column 3C Weka
Numeric
310
6
3
No
Glass Identification Database
Numeric
214
9
7
No
Heart Statlog
Numeric
270
13
2
No
Iris Plants Database
Numeric
150
4
3
No
Johns Hopkins University Ionosphere Database
Numeric
351
34
2
No
Optical Recognition of Handwritten Digits
Numeric
5620
64
10
No
Pima Indians Diabetes Database
Numeric
768
8
2
No
Protein Localization Sites
Numeric
336
7
8
No
Vowel Context Data
Numeric
990
11
11
No
Waveform Database Generator
Numeric
5000
40
3
No
Wine Recognition Data
Numeric
178
13
3
No
Wisconsin Breast Cancer
Numeric
699
9
2
Yes


## 6.2. Validation Metrics

To verify the accuracy of the algorithms, blind versions of these datasets were created in the experimental studies, and the results of the precision (Pr), recall (Re), f-measure (Fm), and accuracy (Ac) tests were generated by means of matches between the desired and proposed classes. The Pr, Re, Fm, and Ac test results in this section were calculated using min-max normalization between 0 and 1 and using the Euclidean distance metric owing to this being generally used for K-means++ clustering in literature. In addition, the clustering operations were performed according to the original class numbers of the datasets, in order to be able to compare the desired classes with the proposed clusters.In Table2, the Ac, Fm, Re, and Pr values, which were computed by the standard K-means++ clustering, and the weighted K-means++ clustering with Pearson's correlation, gain ratio, information gain, and relief features selection methods are given. They are presented separately as percentages for 14 datasets in Table 2. The Ac, Fm, Re, and Pr values can be computed as follows, respectively:(32)Ac=Tp+TnTp+Tn+Fp+Fn,(33)Fm=2∗Pr∗RePr+Re,(34)Re=TpTp+Tn,(35)Pr=TpTp+Fp,where Tp is the true-positive value, Tn is the true-negative value, Fp is the false-positive value, and Fn is the false-negative value.Table 2
TheAc, Fm, Re, and Pr values (%) calculated separately for 14 datasets and the standard and the weighted K-means++ clustering approaches.
Datasets
Standard
Correlation
Gain ratio
Info gain
Relief
Blocks Classification
A
c
94.81
95.13∗
94.93∗
95.12∗
95.13∗
F
m
95.37
95.59∗
95.45∗
95.58∗
95.59∗
R
e
96.86
96.95∗
96.89∗
96.95∗
96.95∗
P
r
92.69
92.03
94.44∗
94.81∗
94.45
Cardiac Arrhythmia Database
A
c
97.64
98.08∗
96.91
97.66∗
95.85
F
m
94.35
95.97∗
93.22
93.77
90.67
R
e
96.07
96.60∗
94.69
95.44
93.28
P
r
92.69
95.35∗
91.79
92.15
88.21
Column 3C Weka
A
c
85.77
84.73
84.29
86.81∗
83.81
F
m
79.79
81.03
80.46
83.58∗
79.86
R
e
80.24
81.42
80.93
83.95∗
80.37
P
r
79.35
80.64
80.00
83.22∗
79.35
Glass Identification Database
A
c
81.05
75.39
77.62
81.55∗
75.57
F
m
56.85
51.55
50.49
58.48∗
48.10
R
e
79.85
56.54
66.47
79.99∗
55.27
P
r
44.13
47.38∗
40.70
46.09∗
42.57
Heart Statlog
A
c
69.20
73.61∗
73.61∗
73.61∗
73.61∗
F
m
74.16
77.19∗
77.19∗
77.19∗
77.19∗
R
e
75.81
78.11∗
78.11∗
78.11∗
78.11∗
P
r
72.59
72.59
72.22
86.29∗
80.74∗
Iris Plants Database
A
c
91.97
95.98∗
96.87∗
96.87∗
97.32∗
F
m
88.01
94.00∗
95.33∗
95.33∗
97.32∗
R
e
88.03
94.01∗
95.33∗
95.33∗
96.04∗
P
r
88.00
94.00∗
95.33∗
95.33∗
96.00∗
Johns Hopkins University Ionosphere Database
A
c
67.22
67.17
67.56∗
68.21∗
67.17
F
m
73.60
73.55
73.85∗
74.30∗
73.55
R
e
78.58
78.46
78.77∗
79.05∗
78.46
P
r
69.23
69.23
69.51∗
70.08∗
69.23
Optical Recognition of Handwritten Digits
A
c
84.51
84.52∗
86.17∗
85.47∗
84.50
F
m
19.68
19.54
31.97∗
26.03∗
19.49
R
e
25.15
24.56
41.63∗
33.02∗
24.59
P
r
16.17
16.23∗
25.95∗
21.48∗
16.14
Pima Indians Diabetes Database
A
c
77.77
77.77
77.51
78.01∗
77.10
F
m
80.98
80.98
80.81
81.10∗
80.53
R
e
83.31
83.31
83.26
83.27
83.10
P
r
78.77
78.77
78.51
79.03∗
78.12
Protein Localization Sites
A
c
92.38
92.05
95.30∗
91.75
91.85
F
m
79.44
78.44
88.61∗
78.01
77.37
R
e
81.63
80.66
90.06∗
79.28
79.86
P
r
77.38
76.33
87.20∗
76.78
75.03
Vowel Context Data
A
c
88.48
88.81∗
88.68∗
88.77∗
87.75
F
m
42.26
43.49∗
41.30
41.96
35.87
R
e
53.06
54.95∗
49.54
53.97∗
43.59
P
r
35.11
35.99∗
35.41∗
34.33
30.48
Waveform Database Generator
A
c
83.26
83.24
83.38∗
83.17
83.09
F
m
79.41
79.39
79.54∗
79.32
79.23
R
e
82.67
82.66
82.80∗
82.65
82.54
P
r
76.40
76.38
76.54∗
76.26
76.18
Wine Recognition Data
A
c
96.39
94.77
95.94
97.48∗
97.51∗
F
m
95.14
92.85
94.45
96.36∗
96.40
R
e
95.35
93.01
94.53
96.65∗
96.75∗
P
r
94.94
92.69
94.38
96.06
96.06
Wisconsin Breast Cancer
A
c
71.69
72.43∗
72.58∗
72.58∗
72.58∗
F
m
77.19
77.69∗
77.79∗
77.79∗
77.79∗
R
e
82.48
82.71∗
82.76∗
82.76∗
82.76∗
P
r
72.53
73.24∗
73.39∗
73.39∗
73.39∗
∗The Ac, Fm, Re, and Pr values (%) higher than the standard approach.To verify the consistency of the centroids, the measurements for SSE analyses were implemented in this experimental study. The SSE values for 14 datasets using Euclidean, Manhattan, and Chebyshev distance metrics to see the variances for each metric were computed separately. SSE is computed as in the following equation:(36)SSE=∑i=1k∑j=1fCi,j−Ii,j″2,where Ii′ is the set of the closest instances in I to Ci.Finally, for compatibility testing, the differences between multivariate and 2D structures of the centroids as ℓ were measured as detailed in Problem Definition. The ℓ value is expected to be zero or approximately zero. Resultant ℓ values were evaluated separately in terms of the traditional (KS, KP, and B2FM) and the proposed (KQ, WMC, WMG, WMI, and WMR) approaches. The results shown in Figure2 were obtained on 10 datasets having more than 2 classes because it was observed that all approaches could map the 2 centroids of the other 4 datasets (Heart Statlog, Johns Hopkins University Ionosphere Database, Pima Indians Diabetes Database, and Wisconsin breast cancer) on the furthest edges on the map, and consequently, the ℓ values were computed as 0, that is, the most optimal value that can be obtained.Figure 2
The ℓ values for 8 algorithms and 10 datasets having more than 2 classes.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)


## 6.3. Experimental Results

The results of accuracy tests show generally that information gain is the most successful clustering approach as it has higherAc values for 12 datasets than is standard in comparison with the other approaches. Gain ratio has higher accuracy values than standard for 9 datasets, correlation has higher accuracy for 7 datasets, and relief has higher accuracy for 5 datasets. Considering Fm values, information gain has higher values than standard for 10 datasets, gain ratio has higher values for 8 datasets, correlation has higher values for 6 datasets, and relief has higher values for 4 datasets. With respect to Re, information gain has higher values then standard for 10 datasets, gain ratio has higher values for 8 datasets, correlation has higher values for 6 datasets, and relief has higher values 5 for datasets. Finally, regarding Pr values, info gain has higher percentage values for 9 datasets than standard; gain ratio has higher values for 8 datasets, correlation has higher values for 6 datasets, and relief has higher values for 3 datasets. These results support the conclusion that weighted K-means++ clustering with feature selection methods, particularly information gain, provides more accurate centroids than traditional K-means++ clustering.The values in Table3 were obtained by calculating the means of the Ac, Fm, Re, and Pr values in Table 2 for 14 datasets. The results in this table demonstrate that the weighted clustering approaches help to increase the accuracy of the clustering algorithms. In addition, information gain is shown to be the most efficient feature selection method for clustering operations, as it has the highest values for the means of the Ac, Fm, Re, and Pr values. Across 14 datasets, the average of the Ac values of information gain (Ac¯) is 85.50%, whereas the standard value is 84.43%; the average of Fm values of information gain (Fm¯) is 76.05%, whereas the standard value is 74.01%; the average of Re values for information gain (Re¯) is 80.03%, whereas the standard value is 78.50%; and the average of Pr values for information gain (Pr¯) is 73.23%, whereas the standard value is 70.71%. Gain ratio and correlation techniques also have higher average values than standard; however, it is observed that relief cannot obtain higher average values than standard for all measurements (specifically, Fm¯ and Re¯ values are lower).Table 3
The means of theAc, Fm, Re, and Pr values (%) for 14 datasets and the standard and the weighted K-means++ clustering approaches.
Means
Standard
Correlation
Gain ratio
Info gain
Relief
A
c
¯
84.43
84.54∗
85.09∗
85.50∗∗
84.48∗
F
m
¯
74.01
74.37∗
75.32∗
76.05∗∗
73.49
R
e
¯
78.50
77.42∗
79.69∗
80.03∗∗
76.54
P
r
¯
70.71
71.48∗
72.52∗
73.23∗∗
71.13∗
∗The Ac, Fm, Re and Pr values (%) higher than the standard approach. ∗∗The highest means of Ac, Fm, Re, and Pr values (%).As a result, the values in Tables2 and 3 support the claim that the most successful approach for determination of the weights of the features is weighted K-means++ clustering with information gain. Furthermore, in comparison with the other feature selection methods, relief is not efficient for determining the weights.Traditional K-means++ clustering and four weighted K-means++ clustering approaches incorporating feature selection methods were compared in this analysis. The number of clusters for each dataset was assumed to be the original class number. The SSE values in Figure3 show that distance metrics do not affect them significantly, whereas it can be seen clearly that all weighted clustering approaches incorporating feature selection methods produce fewer errors than traditional clustering for all datasets. Moreover, the weighted clustering decreased the SSE values by a large proportion, with information gain reducing SSE by 33% for the “Blocks Classification” dataset; relief reducing SSE by 75% for the “Cardiac Arrhythmia Database” dataset; gain ratio reducing SSE by 45% for the “Column 3C Weka” dataset; relief reducing SSE by 67% for the “Glass Identification Database” dataset; gain ratio, information gain, and relief reducing SSE by 73% for the “Heart Statlog” dataset; gain ratio and relief reducing SSE by 35% for the “Iris Plants Database” dataset; gain ratio reducing SSE by 54% for the “Johns Hopkins University Ionosphere Database” dataset; gain ratio reducing SSE by 34% for the “Optical Recognition of Handwritten Digits” dataset; relief reducing SSE by 56% for the “Pima Indians Diabetes Database” dataset; gain ratio reducing SSE by 42% for the “Protein localization sites” dataset; relief reducing SSE by 77% for the “Vowel Context Data” dataset; information gain reducing SSE by 51% for the “Waveform Database Generator” dataset; information gain reducing SSE by 47% for the “Wine Recognition Data” dataset; and relief reducing SSE by 76% for the “Wisconsin Breast Cancer” dataset. In particular, relief, gain ratio, and information gain are better than the other approaches in decreasing errors. Moreover, relief is the most successful approach to reducing SSE in proportion to its accuracy results.Figure 3
The SSE values that were obtained by using Euclidean, Manhattan, and Chebyshev distance measurements for 14 datasets: (a) Blocks Classification; (b) Cardiac Arrhythmia Database; (c) Column 3C Weka; (d) Glass Identification Database; (e) Heart Statlog; (f) Iris Plants Database; (g) Johns Hopkins University Ionosphere Database; (h) Optical Recognition of Handwritten Digits; (i) Pima Indians Diabetes Database; (j) Protein Localization Sites; (k) Vowel Context Data; (l) Waveform Database Generator; (m) Wine Recognition Data; (n) Wisconsin Breast Cancer.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
(n)In Figure 2, the approaches are compared with each other separately for each dataset, revealing that KS, KP, and B2FM have generally higher differences than the other proposed approaches. However, because the ℓ values were obtained between different ranges for each dataset the ℓ values were normalized between 0 and 100 for each dataset, the average of each was calculated, and the results were obtained as the percentage value to enable clear comparison (Table4). Finally, compatibility values were computed as 40% for KS, 50% for KP, and 39% for B2FM, while much higher values of 96% for KQ, 65% for WMC, 80% for WMG, 79% for WMI, and 69% for WMR were computed.Table 4
The compatibility results (%) on 10 datasets for the traditional and the proposed approaches.
KS
KP
B2FM
KQ
WMC
WMG
WMI
WMR
40
50
37
96∗
65
80
79
69
∗The highest compatibility result (%).The results support the claim that KQ is the most compatible approach, achieving 96% for all datasets. Additionally, the weighted approaches for KS, KP, and B2FM are more compatible than the traditional approaches. Furthermore, WMG and WMI have higher compatible values than the other weighted approaches, WMC and WMR. As a result, because B2FM has a 37% compatibility result, besides two most valuable features, it can be claimed that the other features have high mapping efficiency, as well.


## 7. Conclusions and Future Work

In this paper, five mapping approaches containing hybrid algorithms were proposed and presented in detail. One involves K-means++ and QGA used together, and the others are weighted approaches based on four different feature selection methods (Pearson's correlation, the gain ratio, information gain, and relief methods). According to the experimental results, by evaluation of DRV-P-MC as an optimization problem, mapping K-means++ centroids using QGA emerges as the most successful approach, with the lowest differences between the multivariate and 2D structures for all datasets and the highest compatibility value (96%). Conversely, despite its reputation as the most popular mapping algorithm, SOM did not perform as expected in compatibility tests in comparison with the proposed optimization algorithm. However, the weighted approaches based on information gain, gain ratio, and relief provided more consistent clusters than traditional clustering with means indicating approximately 50% lower SSE values. Additionally, the experiments demonstrate that weighted clustering by using information gain provides the highest average accuracy (85.5%) for all 14 datasets and achieves more accurate placements on the map than PCA, while preserving the most valuable features, unlike PCA. As a result, this study claims that the most successful hybrid approach for mapping the centroids is the integration of weighted clustering with the information gain feature selection method and QGA.This paper proposes novel approaches that are open to improvement by the use of different hybrid structured algorithms. For example, all approaches in the paper have focused on K-means++ clustering; however, the proposed approaches can be adapted for other partitional clustering algorithms. In addition, it can be foreseen that, for 3-dimensional mapping, the weighted approach based on information gain will show higher performance than the other approaches because two most valuable features are preserved for two dimensions, and the third one can be computed by the weighted average of other features. Moreover, this weighted approach offers utility by means of its consistency and plain algorithmic structure for the visualization of stream data because the updatable entries of clustering features can determine a summary of clusters’ statistics simply. Moreover, the visualization of a large-scale dataset can be achieved by using the proposed approaches after data summarization by clustering with many clusters.The proposed algorithms can be used extensively across a wide range of fields including medicine, agricultural biology, economics, and engineering sciences. These fields have datasets potentially containing multidimensional structures. If there are lots of instances in this multidimensional structure, the size of the dataset mitigates against understanding the dataset and makes decisions difficult. Our algorithms presented in this paper shrink the dataset size vertically by means of clustering and horizontally by means of dimensional reduction.



---

*Source: 9253295-2018-08-08.xml*