## 3 The Proposed Algorithm
### Mathematical Formula  
This Section highlights the mathematical formula for CCA algorithm in its basic form without hybridization of clustering to make it more clear and easier to describe. The formulas below give strength, evidence, and reliability to the mechanism of the proposed algorithm. The algorithm starts with constructing the distance matrix (D_M) for every class. Each row in D_M consists of the distances between a point and the other points in a specific class. The summation for every row is stored in a new column. The row with the smallest summation shows the strongest similarity, also called the Core point, which summarizes most or all the characteristics of a certain class. Classifying any test point will be determined according to the similarities with the Cores of the classes. The scenario of three classes is shown symbolically as \(c_{1},c_{2},c_{3}\) from the original dataset (DS) and can be represented in sub-datasets as \(ds_{c1}\), \(ds_{c2}\), and \(ds_{c3}\), with every class, respectively, consisting of a number of points \((i,j,k)\), as follows:  
\[ds_{c1=}\Big{\{}c_{1(p1)},c_{1(p2)},c_{1(p3)},\dots,c_{1(pi)}\Big{\}} \tag{1}\]  
\[ds_{c2=}\Big{\{}c_{2(p1)},c_{2(p2)},c_{2(p3)},\dots,c_{2(pi)}\Big{\}} \tag{2}\]  
\[ds_{c3=}\Big{\{}c_{3(p1)},c_{3(p2)},c_{3(p3)},\dots,c_{3(pk)}\Big{\}} \tag{3}\]  
Distance matrixes for the three classes are represented as \(\left(\text{D}_{\text{M}}\right)_{c1},\ \left(\text{D}_{\text{M}}\right)_{c2},\ \left(\text{D}_{\text{M}}\right)_{c3}\) with sizes, \(i\times i,j\times j\), and \(k\times k\), respectively. For the \(\left(\text{D}_{\text{M}}\right)_{c1}\) every row contains i cells which represent the distances between every point \((pi)\) in class 1 with all the others. The same approach is used to create \(\left(\text{D}_{\text{M}}\right)_{c2}\) and \(\left(\text{D}_{\text{M}}\right)_{c3}\), as shown by the equations below:  
\[\left(\text{D}_{\text{M}}\right)_{c2}=\prod_{n=1}^{j}dis\Big{(}c_{2(pi)},ds_{ c2}\Big{)} \tag{4}\]  
\[\left(\text{D}_{\text{M}}\right)_{c3}=\prod_{n=1}^{k}\ dis\Big{(}c_{3(pi)},ds_{ c3}\Big{)} \tag{5}\]  
Figure 2: Linear and non-linear classification (**a**) linear classification of the data distribution; (**b**) combine the algorithm with clustering arises.  
The core vectors (Cor_v_) with sizes (\(i\times 1\)), (\(j\times 1\)), and (\(k\times 1\)) are created by calculating the sum of each row in \(\mathrm{D_{M}}\) representing the furthest extent that the point (row) might represent the characteristics of its class.  
\[(\mathrm{Cor\_}v)_{c1}=\prod_{n=1}^{i}\sum_{col=1}^{i}(\mathrm{D_{M}})_{c1}. \tag{6}\]  
\[(\mathrm{Cor\_}v)_{c2}=\prod_{n=1}^{j}\sum_{col=1}^{j}(\mathrm{D_{M}})_{c2}. \tag{7}\]  
\[(\mathrm{Cor\_}v)_{c3}=\prod_{n=1}^{k}\sum_{col=1}^{k}(\mathrm{D_{M}})_{c3}. \tag{8}\]  
The core for every class is found by selecting the minimum value in Cor_v_, where this core has most similarities of the points within its class. Accordingly, three cores (Cor)\({}_{c1}\), (Cor)\({}_{c2}\), and (Cor)\({}_{c3}\) are obtained for every class \(c_{1}\), \(c_{2}\), and \(c_{3}\), respectively, thus, test points can be classified to appropriate classes by realizing the greatest similarity with their cores.