## 4 Comparison of Predicted Values and Experimental Results
The thermal error is collected by the displacement sensor at 11:30, so the thermal error caused by heat is 0 in the initial stage, and the subsequent errors are relative to the initial time. Figure 9 shows thermal error in the z-direction of the spindle terminal as it relates to changes in ambient temperature. In this study, different thermal error predictive models were used to predict the thermal error of the machine tool, and the models were compared to decide which one was better in terms of prediction accuracy. This paper divides the second set of the test data into 10 groups and predicts them. Predictions based on different thermal error models were obtained. In order to verify the overall performance of the self-organizing DNN network modeling method, two types of network were used at the same time to train the model using thermal error data. Performances of the predictive models are compared in Figure 10.  
Figure 10: Comparing different methods. Figure 9: Thermal error in the z-direction of the spindle. To compare the generalization ability, for all cases, epochs were given a value of 200 and supervised training was performed for 1000 steps. Under the same experimental conditions, the root mean square error of the self-organizing DNN was lower than that of the DNN, which suggests the self-organizing DNN provides more accurate predictions of the thermal error and has better generalization ability. Self-organizing DNN achieved a convergence speed much higher. Under the same experimental conditions, the overall training time was longer than 6 h, and it took each RBM approximately 1 h to complete the unsupervised training. Since the self-organizing DNN uses a self-organizing mechanism to randomly remove neurons and the regularization enhancement algorithm also has an influence on the convergence rate of unsupervised training, the training time of each RBM was 2-3 h, which is an improvement of more than 30%. Experiments show that self-organizing DNN has a faster convergence speed and better generalization ability under the same neural network structure and experimental conditions. A comparison of data in the second and third curve of Figure 10 reveals that both the drop rate and regularization enhancement parameter have an influence on the training results. Appropriately increasing the values of the drop rate and performance parameters will improve the accuracy of the model, however further increases will lead to increased training error. Thus, choosing a proper drop rate value is important as well as trying different performance parameter values during different experiments. When the network is applied to the multitasking problem, a larger network structure may be required and the drop rate and regularization enhancement parameter should be adjusted for different values based on different experiments. By comparing the mean squared error (MSE) of each method, we can see that: The prediction result of self-organizing DNN (alpha = 0.8, beta = 0.2) has the lowest error and is more stable. One should note that the training data is not too much in this experiment, this is because not all conditions are considered and tested. For example, if the workshop door opens often in winter, the measured temperature will be changed greatly, which may cause thermal error harder to predict. This is what we will continue in next step. However, in this paper, we have fully trained and tested the model using current dataset. For example, many different training parameters (unsupervised training steps, supervised training steps, learning rates, hidden layer neuron number, etc.) are evaluated, and the best parameter is selected. Moreover, the model is trained and tested for several times, to evaluate the stability. In the future, we believe that the method is easily applied to other conditions based on the current research.