# Weighted \(z\)-Distance-Based Clustering and Its Application to Time-Series Data
## Appendix B  
Another simple example is given here to illustrate how SCC-IW works. Suppose \(\mathbf{X}\) has the following 15 training instances:  
\[\begin{array}{llllll}\mathbf{x}_{1}=&[0.450&0.739&0.044&0.865&0.641&0.036]^{T };\\ \\ \mathbf{x}_{2}=&[0.240&0.985&0.957&0.808&0.601&0.053]^{T};\\ \\ \mathbf{x}_{4}=&[0.125&0.411&0.769&0.165&0.769&0.340]^{T};\\ \\ \mathbf{x}_{5}=&[0.613&0.842&0.262&0.807&0.438&0.953]^{T};\\ \\ \mathbf{x}_{6}=&[0.520&0.574&0.394&0.879&0.656&0.022]^{T};\\ \\ \mathbf{x}_{7}=&[0.753&0.812&0.258&0.897&0.050&0.482]^{T};\\ \\ \mathbf{x}_{8}=&[0.114&0.493&0.783&0.674&0.588&0.499]^{T};\\ \\ \mathbf{x}_{9}=&[0.176&0.491&0.787&0.760&0.601&0.326]^{T};\\ \\ \mathbf{x}_{10}=&[0.172&0.620&0.714&0.802&0.692&0.089]^{T};\\ \\ \mathbf{x}_{11}=&[0.997&0.813&0.213&0.884&0.166&0.613]^{T};\\ \\ \mathbf{x}_{12}=&[0.147&0.498&0.738&0.889&0.111&0.100]^{T};\\ \\ \mathbf{x}_{13}=&[0.172&0.620&0.714&0.802&0.692&0.089]^{T};\\ \\ \mathbf{x}_{11}=&[0.997&0.813&0.213&0.884&0.166&0.613]^{T};\\ \\  
\[\mathbf{x}_{13} =[0.287\ \ 0.052\ \ 0.193\ \ 0.821\ \ 0.625\ \ 0.090]^{T};\] \[\mathbf{x}_{15} =[0.009\ \ 0.831\ \ 0.282\ \ 0.842\ \ 0.885\ \ 0.561]^{T}.\]  
Note that \(N=15\) and \(n=6\). Each instance is a short time series comprising 6 consecutive time samplings. Let \(\rho=0.125\) and \(\sigma_{0}=0.125\) Below, we consider the feeding order of \(\mathbf{x}_{1}\),..., \(\mathbf{x}_{15}\).  
* By SCC, 7 clusters, \(C_{1}\),..., \(C_{7}\), are obtained, with size being 3, 1, 5, 1, 1, 3, and 1, respectively. Instances, \(\mathbf{x}_{6}\), and \(\mathbf{x}_{13}\) are assigned to \(C_{1}\) ;, \(\mathbf{x}_{8}\), \(\mathbf{x}_{9}\), \(\mathbf{x}_{10}\), and \(\mathbf{x}_{12}\) are assigned to \(C_{3}\) ; and, \(\mathbf{x}_{11}\), and \(\mathbf{x}_{14}\) are assigned to \(C_{6}\). \(C_{2}\), \(C_{4}\), \(C_{5}\), and \(C_{7}\) are singletons, containing \(\mathbf{x}_{2}\), \(\mathbf{x}_{4}\), \(\mathbf{x}_{5}\), and \(\mathbf{x}_{15}\), respectively.
* By SCCI-I, convergence is achieved in the 3 rd iteration with 4 clusters, \(C_{1}\),..., \(C_{4}\), with size being 5, 5, 4, and 1, respectively. Instances \(\mathbf{x}_{1}\), \(\mathbf{x}_{2}\), \(\mathbf{x}_{6}\), \(\mathbf{x}_{10}\), and \(\mathbf{x}_{13}\) are assigned to \(C_{1}\) ; \(\mathbf{x}_{3}\), \(\mathbf{x}_{4}\), \(\mathbf{x}_{8}\), \(\mathbf{x}_{9}\), and \(\mathbf{x}_{12}\) are assigned to \(C_{2}\) ; \(\mathbf{x}_{5}\), \(\mathbf{x}_{7}\), \(\mathbf{x}_{11}\), and \(\mathbf{x}_{14}\) are assigned to \(C_{3}\) ; and \(\mathbf{x}_{15}\) is assigned to \(C_{4}\).
* By SCC-IW, convergence is also achieved in the 3 rd iteration, but with only 3 clusters, \(C_{1}\), \(C_{2}\), \(C_{3}\), with size being 5, 5, and 5, respectively. Instances \(\mathbf{x}_{1}\), \(\mathbf{x}_{2}\), \(\mathbf{x}_{6}\), \(\mathbf{x}_{10}\), and \(\mathbf{x}_{13}\) are assigned to \(C_{1}\) ; \(\mathbf{x}_{3}\), \(\mathbf{x}_{4}\), \(\mathbf{x}_{8}\), \(\mathbf{x}_{9}\), and \(\mathbf{x}_{12}\) are assigned to \(C_{2}\) ; and \(\mathbf{x}_{5}\), \(\mathbf{x}_{7}\), \(\mathbf{x}_{11}\), \(\mathbf{x}_{14}\), and \(\mathbf{x}_{15}\) are assigned to \(C_{3}\). The instances assigned to the clusters are shown in Figure A3a-c. The weights associated with the cluster are: \[\mathbf{w}_{1} =[0.134\ \ 0.232\ \ 0.259\ \ 0.211\ \ 0.095\ \ 0.069]^{T};\] \[\mathbf{w}_{2} =[0.000\ \ 0.000\ \ 0.055\ \ 0.221\ \ 0.333\ \ 0.391]^{T};\] \[\mathbf{w}_{3} =[0.385\ \ 0.328\ \ 0.225\ \ 0.062\ \ 0.000\ \ 0.000]^{T}\]  
Which are depicted in Figure A3d. The clustering done by SCC-IW seems to be the most suitable, intuitively. All the instances assigned to cluster \(C_{1}\) have similar time samplings at indices 2, 3, and 4 which are manifested by large weights at these indices. Similarly, all the instances assigned to cluster \(C_{2}\) have similar time samplings at indices 4, 5, and 6, which are manifested by large weights at these indices, and all the instances assigned to cluster \(C_{3}\) have similar time samplings at indices 1, 2, and 3, which are manifested by large weights at these indices.