A study of Machine Learning for Prediction in Panel Data - Huang, Shenglong; Hu, Lingyun (International Journal of Computer Science and Information Technology, 2024)
With the development of the times, the prediction study of machine learning in panel data is becoming more and more extensive, this paper adopts the RNN algorithm and XGBoost algorithm to carry out the prediction study on the quarterly GDP panel data of 31 provinces and cities in China from the 1st quarter of 2005 to the 4th quarter of 2023, and compares and analyses the two methods. In the forecasting study, this paper considers the influence of geographic location in the panel data, and the results show that there are significant regional differences in the RNN algorithm in forecasting, and the eastern coastal and inland provinces with stronger economies perform better, for example, the training set correlation coefficient of Guangdong province is as high as 0.8052, followed by Anhui and Hubei. However, the Qinghai-Xizang region performs poorly and is at risk of overfitting. The XGBoost algorithm, on the other hand, shows high correlation coefficients on both the training and test sets in most provinces and cities, especially in Beijing, Tianjin and Hebei, where the correlation coefficients are above 0.9, showing good prediction results. In terms of mean square error, the MSE of the training set is generally smaller than that of the test set, indicating that the predicted values of some regions have a large deviation from the actual values. In terms of the mean absolute percentage error (MAPE), the MAPE of most provinces and cities is below 1%, which indicates that the relative error of prediction is small. Comprehensive analysis shows that XGBoost is good at dealing with nonlinear relationships and complex feature interactions, and is especially suitable for capturing nonlinear geolocation features, while RNN may be more effective in dealing with temporal geolocation features; XGBoost has a strong fitting ability and is suitable for sparse data, while RNN needs more data to learn effective representations; XGBoost has less need for hyperparameter tuning, while RNN is is more sensitive to hyperparameters.