Objective This study aims to enhance the nonlinear fitting ability and prediction accuracy of natural gas demand forecast models by effectively capturing local feature information from the time series data of monthly natural gas demands, considering the multiple factors that influence these demands.
Methods First, multi-fractal detrended fluctuation analysis (MF-DFA) was utilized for the fractal analysis of the time series data of monthly natural gas demands. Second, quadratic interpolation and random forest (RF) interpolation methods were employed to address inconsistencies and gaps in the time granularities of the feature sequence data related to the influencing factors. Third, the eXtreme Gradient Boosting (XGBoost) model was applied to compare computational errors in the original feature sequences before and after interpolation, as well as in the new feature sequences screened by Boruta, SHAP, and BorutaShap. This comparison identifies the optimal dimension reduction method for feature sequence screening, thereby further lowering the dimensionality and scale of model input data. Finally, the Sobol low-discrepancy sequence, an enhanced density factor, and the Levy flight strategy were incorporated to increase distribution uniformity in the population initialization range, expand the iterative search range, and avoid local optima for the honey badger algorithm (HBA). These enhancements collectively strengthened the optimization effect of the improved HBA on parameters that determine the model’s fitting ability, such as the number of decision trees, depth of decision trees, and learning rate in the XGBoost model.
Results The BorutaShap algorithm was identified as the most effective method for the dimension reduction of feature sequences. The proposed model outperformed the reference models in terms of prediction accuracy, achieving MAPE of 2.87%, MAE of 9.3509, RMSE of 11.3353, and R2 of 0.8909.
Conclusion The proposed methodology is suitable for natural gas demand forecast under various influencing factors, providing a reference basis for planning and decision-making in the natural gas industry.