# Data Compression Based on Stacked RBM-AE Model for Wireless Sensor Networks
## 3 Results and Discussion
### Compression and Reconstruction
When the number of pre-training iterations is 10 and the number of retraining iterations is 0, the compression performance of the model is  
Figure 5: The loss value of model with different learning rates. Figure 6: (**a**) Compression performance under different number of pre-training iterations without retraining; (**b**) compression performance under different retraining iterations with the number of pre-training iterations as 10.  
optimal with the smallest \(PRD\) value and the largest \(QS\) value. Thus, we set the number of pre-training iterations of our model to 10. When the number of pre-training iterations is fixed, increasing the number of retraining iterations can significantly improve the compression performance of the model. When the number of retraining iterations reaches 200 and above, the compression performance of the model tends to be stable. At this time, increasing the number of retraining iterations does not significantly improve the compression performance of the model. Considering that the model needs to be calculated on the sensor node, increasing the number of retraining iterations will lead to an increase in calculation energy consumption. We finally selected the number of retraining iterations as 200. In this experiment, we test the compression performance of the model under different _CRs_. This experiment data uses the data of node 7 with the number of pre-training iterations of 10, and the number of retraining iterations of 200. We then set \(CR\) as 10, 20, 40, and 120. We use the test set of node 7 to calculate the \(PRD\) value and the \(QS\) value of the model under different _CRs_. During the test, we summed up the \(PRD\) value and the \(QS\) value of each mini-batch of the test set, and then averaged the sum value as the final result. The number of mini-batches of the test set is 325. Figure 7 shows the compression performance of the model under different _CRs_. Figure 7 illustrated that for a single node, with the increase of the \(CR\), the compression performance of the model is not significantly increased or decreased, which shows that the model can imbib the inherent properties of the data. These inherent properties are inherently weighted on the weight matrix and are independent of the dimension after compression. This is the difference between the deep compression method and the shallow compression method, since the reconstruction error of the shallow compression method increases with an increase in the \(CR\). The result means that our algorithm can get a higher \(CR\) in the case of minimal reconstruction error. In our experiments, when \(CR\) was 10, the \(PRD\) value was the smallest. The reconstructed data value is closest to the original data value. Although increasing \(CR\) can significantly increase the \(QS\) value, the \(PRD\) value will also increase, which represents a difference between the reconstructed data, and the original data becomes larger. In this experiment, we explore the optimal compression performance of the model, and in the next experiment, we set the \(CR\) to 10 to explore the reconstruction performance of the model. Figure 8 shows the reconstructed data and the original data of node 7 for our model, with the number of pre-training iterations being 10, the number of retraining iterations being 200, and \(CR\) of 10. We first use the model to compress the original data, and then use the model to reconstruct  
Figure 7: (**a**) The \(PRD\) value under different _CRs_, (**b**) The \(QS\) value under different _CRs_. the compressed data. For all the data in the test set of node 7, we sum up the absolute value error between the original data and the reconstructed data, and then average the sum value as the final result. The average absolute value error obtained was 0.2815 \({}^{\circ}\)C, maximum value was 0.4602 \({}^{\circ}\)C, and minimum value was 0.0026 \({}^{\circ}\)C. Our model has been proven to have higher reconstruction accuracy, and the reconstructed data can correctly approximate the trend and value of the original data.