## 4 Data Partition and Modeling
### Modeling  
#### 4.2.1 Tcn  
TCN has demonstrated excellent performance with sequential data in various studies [29]. Especially, it exhibited superior performance in sequence classification, such as vision, natural language processing (NLP), and music fields, in comparison with Vanilla RNN, gated recurrent unit, and long short-term memory (LSTM) [10]. In this study, we used dilated causal 1D convolution [30] for DDP to use the available information up to the current time. The 1D dilated causal convolution, which is computed by Equation (2), is illustrated in Figure 6, where \(s\), \(d\), and \(k\) denote 1D sequence input, dilation rate, and filter size, respectively. Furthermore, \(F(t)\) denotes the result of the convolution operation at time \(t\).  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Pattern Name**} & \multirow{2}{*}{**Stroke Count**} & \multicolumn{2}{c}{**Avg. Sequence of**} & \multicolumn{2}{c}{**Std. of**} & \multirow{2}{*}{**Avg. Sequence of**} & \multirow{2}{*}{**Std. of**} & \multirow{2}{*}{**_p-Value**} \\  & & **Training Set** & & & & **Test Set** & **Test Set** \\ \hline English 1 & 4 & 59.63 & 11.37 & 59.52 & 11.88 & 0.88 \\ English 2 & 4 & 75.94 & 13.12 & 75.98 & 13.33 & 0.96 \\ English 3 & 5 & 61.27 & 10.43 & 61.16 & 10.36 & 0.87 \\ English 4 & 4 & 69.65 & 10.51 & 69.38 & 10.29 & 0.68 \\ English 5 & 4 & 69.19 & 11.83 & 69.01 & 12.21 & 0.81 \\ Freestyle 1 & 4 & 82.54 & 16.88 & 82.78 & 17.23 & 0.82 \\ Freestyle 2 & 2 & 52.88 & 13.47 & 52.85 & 13.31 & 0.98 \\ Freestyle 3 & 5 & 92.58 & 21.47 & 92.68 & 21.00 & 0.94 \\ Freestyle 4 & 2 & 67.78 & 14.46 & 67.77 & 14.75 & 0.99 \\ Freestyle 5 & 6 & 124.70 & 25.87 & 124.69 & 26.24 & 1.00 \\ Korean 1 & 4 & 41.47 & 6.99 & 41.34 & 6.97 & 0.78 \\ Korean 2 & 5 & 70.23 & 14.16 & 70.22 & 14.03 & 1.00 \\ Korean 3 & 5 & 60.90 & 10.00 & 61.03 & 10.24 & 0.84 \\ \hline \hline \end{tabular}
\end{table}
Table 7: Statistics pertaining to training and test data from each collected drawing dataset.  
Figure 6: Example of 1D dilated causal convolution (filter size = 3, stride = 1, dilation rate = 2, zero padding = 4).  
\[F(t)=(\mathbf{x}*_{d}f)(t)=\sum_{j=0}^{k-1}f(j)\cdot\mathbf{s}_{t-dj}. \tag{2}\]  
The proposed TCN-based DDP model is illustrated in Figure 7. If we use the FULL variable combination set, the variables input (\(I_{(t,t-1)}\)) and output (\(O_{t}\)) at time \(t\) for the forward structure are represented by Equations (3) and (4), respectively.  
\[I_{(t,t-1)}=\{Act_{t},Act_{t-1},X_{t},Y_{t},Ax_{t},Ay_{t},Az_{t},T\_Diff_{(t,t- 1)}\}, \tag{3}\]  
\[O_{(t)}=\{X_{t},Y_{t},Ax_{t},Ay_{t},Az_{t}\}. \tag{4}\]  
The proposed TCN-based DDP model comprises forward and backward sequential structures. We set four convolution layers with dilation rates of 1, 1, 2, and 4 for the forward and backward structures. After each convolution layer, layer normalization [31] is performed and the rectified linear unit (ReLU) [32] is used as the activation function. The parameter details of this model are summarized in Table 8. The parameters kernel size, kernel depth, and fully connected (FC) hidden nodes are set to 3, 20, and 64, respectively. We use concatenated output features calculated from the second, third, and fourth hidden layers to use the FC input features. One of the characteristics of the calculated output features by dilated 1D convolution is that the output features from a higher hidden layer have a larger receptive field than those obtained from the lower hidden layer. Therefore, the designed concatenated output vector for FC input features can optimize both short- and long-term dependency simultaneously. The number of proposed TCN parameters for the five combinations of the variable set used are listed in Table 9, which confirms that the  
Figure 7: Proposed TCN-based DDP model.  
proposed networks have about 17k parameters according to the number of input (\(nI\)) and output variables (\(nO\)).