# Sequence-Information Recognition Method Based on Integrated mDTW
## 3 Methodology
### Sequence Clustering  
The clustering process outlined in this paper can be interpreted as a form of supervised modeling. Specifically, the method introduced here does not involve the computation of distances between distinct characters; rather, it focuses solely on samples within the same character classes. As elucidated earlier, the computation of complete inner Dynamic Time Warping (DTW) distances for an extensive Chinese handwriting database demands a considerable amount of time, rendering it impractical for experimental purposes. Consequently, we propose the adoption of a simplified hierarchical clustering model designed to compute distances exclusively within the confines of the same character classes. Configuring the model in this manner not only addresses a specific challenge but also confers a distinct advantage, particularly in circumventing the potential computational overhead associated with unnecessary DTW calculations. This streamlined approach serves as a pivotal strategy in mitigating the time cost incurred during the training of the model. The careful restriction of computations to inner class distances within our proposed hierarchical clustering model is a deliberate choice that significantly optimizes the efficiency of the training process. By narrowing the scope of calculation to inner class distances, we strategically eliminate the need for superfluous DTW calculations, leading to a more efficient and resource-friendly model training procedure. This deliberate simplification ensures that the model focuses its efforts on the most relevant aspects, contributing to a streamlined training phase. As a result, the proposed hierarchical clustering model not only expedites the training process but also alleviates the computational burden associated with analyzing the entire database. In essence, the methodology we propose is designed to strategically minimize the intricacies typically involved in DTW computations. The model, by concentrating exclusively on inner class distances, enhances both the expediency and effectiveness of the clustering process. This approach signifies a purposeful optimization, prioritizing efficiency without compromising the model's ability to discern meaningful patterns within the data. By adopting this strategic simplification, the proposed model emerges as a more efficient and scalable solution, making it well-suited for applications where computational resources are a critical consideration. In summary, the deliberate narrowing of focus within our hierarchical clustering model is a strategic choice that pays dividends in terms of both time efficiency and computational effectiveness, ultimately contributing to an enhanced clustering performance. Here, we introduce an exclusive concept of this paper: useless DTW calculation. The definition of this is the computation of DTW distance between two Chinese characters with obvious differences in stroke structures. For instance, when we distinguish Chinese characters from dissimilar handwriting samples, the cluster centers could hardly effect testing results since the results (value of DTW) of these samples are too big to be recognized as the same class. Therefore, the computation of those DTW distances is useless. On the contrary, choices of cluster centers are very important for similar Chinese characters; appropriate cluster centers could remarkably increase recognizing accuracy, as shown in  
Figure 2: Process of dynamic warping, including forward and backward steps. Therefore, the proposed method ignores computing useless DTWs on dissimilar characters and only considers similar samples instead. In order to further reduce the training time cost, the clustering process is set to compute DTWs between samples with the same characters. As discussed above, a database with \(N_{c}\times N_{w}\) samples urges repeating DTW \((N_{c}\times N_{w})^{2}/2\) times at the origin. The simplified method needs to repeat the DTW process \(N_{c}\times N_{w}^{2}/2\) times only.