# A Modeling Design Method for Complex Products Based on LSTM Neural Network and Kansei Engineering
## 3 Empirical Study
### Model Construction and Perceptual Evaluation  
After the feature-category coding and perceptual evaluation, a dataset of truck crane modeling evaluation was established, which includes modeling-feature-category coding with visual sequence (Table 7) and the mean perceptual evaluation values (Table 2).  
The modeling-feature-category coding data in Table 7 was used as the input layer, and the user's mean perceptual evaluation values on the perceptual dimension of the sense of technological-traditional, steady-Light, and integral-piecemeal in Table 2 were used as the output layer to train the KE-LSTM model.  
The structure of the LSTM neural network was shown in Figure 8. In the data processing stage, it was found that the dimension of a CP sequence encoded by one-hot was enormous. In order to enable the computer to accurately understand the meaning of the features extracted manually, we referred to a skip-gram to convert the CP sequence features \(p_{n}^{(t)}=(p_{n}^{t},p_{n}^{t+1},\ldots,p_{n}^{t+l-1})\in\mathbb{R}^{l\times m}\) into low-dimensional vectors.  
In the encoding stage, the vector with dimension (\(l\), \(m\)) is received as the input, \(p_{n}^{(t)}=(p_{n}^{t},p_{n}^{t+1},\ldots,p_{n}^{t+l-1})\in\mathbb{R}^{l\times m}\), and the number of LSTM neurons in the hidden layer is determined by L. According to the structure shown in Figure 8, the inputs of a single LSTM neuron are the \(p_{n}^{t}\) of the current observation time and the hidden representation \(\mathrm{h}_{E}^{t-1}\) of the previous moment input vector encoded by the LSTM neurons. After encoding, the hidden representation \(\mathrm{h}_{E}^{t}\) at this time is obtained as one of the inputs of LSTM neurons at the next moment.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Sample** & **Head (P1)** & **Boom (P2)** & **Body–Chassis (P3)** & **Operation bin (P4)** \\ \hline X1 & [1,11,13,15,15,25,54,55] & [28,31,34,45,53,53,54] & [36,39,42,0,0,0,44,50] & [1,11,14,15,15,55,54] \\ X2 & [1,8,14,19,15,26,52,54] & [28,31,33,47,52,52,52] & [36,39,41,47,54,52,44,49] & [4,8,14,19,15,54,52] \\ X3 & [1,8,14,19,23,26,56,58] & [28,30,32,47,57,56,56] & [35,37,41,46,58,56,44,49] & [1,8,14,19,23,56,58] \\ X4 & [3,11,13,15,16,26,56,54] & [27,31,34,45,53,53,54] & [36,38,41,46,56,53,44,50] & [1,11,14,15,15,56,54] \\ X5 & [1,9,13,15,23,26,55,54] & [27,31,33,45,53,53,54] & [36,38,41,46,55,53,44,49] & [1,9,14,15,15,55,54] \\ \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) \\ X206 & [5,8,14,21,22,26,56,54] & [28,30,32,47,57,56,56] & [36,37,41,46,56,54,43,49] & [1,8,14,21,22,56,54] \\ \hline \hline \end{tabular}
\end{table}
Table 7: Modeling-feature-category coding of truck cranes with visual sequence.  
Figure 8: Perceptual evaluation and prediction model of truck cranes based on LSTM (KE–LSTM).  
Training performance was assessed using the mean square error (MSE) [43], as shown in Formula (3).  
\[\text{loss}=\frac{1}{n}\|y-y_{p}\|^{2} \tag{3}\]  
The data were divided into the training set and test set, accounting for 80% and 20%, respectively. MSE was reduced continuously during the training process. The parameters of the KE-LSTM model were as follows: network structure is two layers; LSTM neuron hidden state size was 32; target error was less than 0.03; the optimizer was Adam; the learning rate was 0.001; dropout was 0.2; model metrics were the loss function shown as Formula (3), and the remaining parameters were set as default values [58].  
Model training was implemented through the PaddlePaddle package of Python 3.8 (64-bit).  
The experimental results are shown in Figure 9. When the number of iterations exceeded 100, the error curves of the training set and the testing set tended to be flat, which met the accuracy requirements of the model. Therefore, the KE-LSTM model can be used for the prediction of the perceptual evaluation score of truck cranes.