# Study of Precipitation Forecast Based on Deep Belief Networks
## 4 Results and Discussion
### Algorithm Validation  
For the assessment of the algorithms' results, calibration and external testing were carried out. In the calibration assessment, the models were developed using the training set and validated with the same one. Finally, the prediction results were obtained via an external validation, training and testing the models with the training and test datasets, respectively. In this paper, the number of samples was 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, and 2000. For each type of sample number, 80% of the data were randomly selected as the training set for constructing the algorithm model, and the remaining 20% of the data were used as the test set to validate the model accuracy. From the analysis in the third section, we know the process of establishing the DBN model. We used the data processing method described in the third section to establish a DBN model for the pre-processed meteorological data. According to the data processing flow, the following data results are obtained. Figure 4 shows the time required for the pre-training part with the number of samples changes. The figure shows that as the number of samples increases, the time required for pre-training increases too. When the number of samples is small, the curve has a linear relationship with the number of samples; when the number of samples reaches a certain size, such as 1400, 1800, and 2000 points, the time consumed is almost the same, but the training time of 1600 points is less than the 1400 point and 1800 point, and it is higher than the pre-training time of 1200 samples. We finetuned the pre-training model that was obtained, used the verification set to obtain the error rate of the fine-tuned model, and selected the model with the smallest error rate as the best model. The result in Figure 5 is the best error rate obtained by verifying the prediction effect of the model by the verification set. When the number of samples gradually increases, the error of the pre-training model in the validation set gradually becomes stable. The error rate of the 200 point is the highest compared to the number of other samples. Because of the small size of the data set, it cannot establish a better pre-training model, so the error is higher than others. The subsequent curve changes smoothly and the error rate is stable at around 11%. Figure 4: Time-varying curve of pre-training with different sample sizes. The curve in Figure 6 is the error rate curve obtained by training the test data on the model. The average error rate of the verification data is 11.17%, and the average error rate of the test data is 10.55%, which is lower than the error rate of training and verification data. The lowest error rate is at the 200 point. Due to the small sample size, the error rate at this point changes significantly. The error rate of the 1600 point is 10%. Although the pre-training time of this point is shorter than others, the error rate is not higher than that of other sample numbers. On the whole, the error rate of the small sample size of the data is larger than the error rate when the sample size of the data is large. Figure 7 shows the time curve of the model training test data. With the increase of the number of samples, the time of the model training test data gradually increases. Only the time of 1000 points is slightly higher than the other points around. Figure 5: The error curve of the pre-training model in the validation set with different sample sizes. Figure 6: The error rate curve of the test data with the model. Figure 7: The time curve of the model training test data. Experiments show that the application of DBN is effective and feasible in the field of precipitation prediction. The deep confidence network used in this article is implemented in the python platform using the theano package, which makes the program have very good scalability and facilitates the application of the program.