## 3 Materials and Methods
### Data  
The data for this study were obtained from a natural gas limited liability company in a district of Chengdu, covering the period from January 2016 to October 2023. These data include monthly records of natural gas purchases and sales. Table 1 presents the detailed statistics of these datasets. For the weather data, Python's'requests' library was used to send HTTP requests to a weather website and scrape the daily temperature data for a district in Chengdu from 1 January 2016, to 30 October 2023. This dataset included the daily maximum and minimum temperatures. The daily data were then grouped by month, and the average maximum and minimum temperatures for each month were calculated. Additionally, dates were converted into time features such as the year and month to capture the seasonal and cyclical trends in the time series. After data cleaning and transformation, the data visualization is shown in Figure 1. The chart illustrates the natural gas sales volumes across various usage types and regions from 2016 to 2023. Training and testing set division: To ensure the model's generalization ability, the dataset was divided into training and testing sets according to the time series. A total of 70% of the data were used for the training set, and 30% were used for the testing set. Specifically, the data from 2016 to 2020 were used for the training set, while the data from 2021 to 2023 were used for the testing set. \begin{table}
\begin{tabular}{l l l} \hline
**Data** & **Data Content** & **Data Source** \\ \hline
2016–2023 Monthly Purchase & Natural gas purchase & Natural Gas LLC, \\ Volume Statistics & volume (\(m^{3}\)) & Chengdu District \\
2016–2023 Monthly Sales Volume & Anjing, Hongguang, Pixian, & Natural Gas LLC, \\ Statistics (detailed by region) & Qiaosong, Xipu (\(m^{3}\)) & Chengdu District \\
2016–2023 Monthly Sales Volume & School, Commercial, Industrial, & Natural Gas LLC, \\ Statistics (detailed by usage) & Residential, Collective (\(m^{3}\)) & Chengdu District \\
2016–2023 Monthly & Max temperature, & Weather Station \\ Weather Data & Min temperature (\({}^{\circ}\)C) & \\ \hline \end{tabular}
\end{table} 
Table 1: Data and sources. Prediction horizon and input window: The past 24 months of historical data were utilized to forecast natural gas purchase volumes for the subsequent 3 months. This 3-month-ahead forecasting approach was implemented in a rolling manner, with each prediction step incorporating updated actual values from the previous step as input. This configuration enabled the model to capture both seasonal patterns and medium-term trends, ensuring robust performance across different time periods. Therefore, a correlation analysis was performed to identify key features that significantly affect the target variable and to uncover high correlations among features, thereby avoiding redundancy in the model [30], This analysis is illustrated in Figures 2 and 3. Figure 2 presents the correlation matrix between regional features (natural gas sales volumes in each region), basic features (year, month, minimum temperature, and maximum temperature), and gas purchase volume. The analysis highlights the basis for feature selection and the relationships among regions. Among the basic features, the year shows a moderate positive correlation with gas purchase volume (\(r\) = 0.56), indicating an overall  
Figure 1: Data visualization. Figure 2: Correlation matrix of regional features, basic features, and gas purchase volume. increase in gas demand over time. Minimum and maximum temperatures show strong negative correlations (\(r=-0.67\) and \(r=-0.69\), respectively), reflecting higher gas demand during colder periods for heating. For regional features, sales volumes in Hongguang, Pixian, and Xipu exhibit high positive correlations with gas purchase volume (\(r=0.73\), \(r=0.78\), and \(r=0.73\), respectively), indicating their predictive significance. In contrast, Anjing and Qiaosong have lower correlations (\(r=0\) and \(r=0.43\), respectively), suggesting limited contributions.