# Time Series Forecasting Method Based on Multi-Scale Feature Fusion and Autoformer
## 2 Materials and Methods  
### Data Source  
This paper collected 3 million real sales records of a large mall in a certain country from the Kaggle data platform ([[https://www.kaggle.com/competitions/store-sales-time-series-forecasting/data](https://www.kaggle.com/competitions/store-sales-time-series-forecasting/data)]([https://www.kaggle.com/competitions/store-sales-time-series-forecasting/data](https://www.kaggle.com/competitions/store-sales-time-series-forecasting/data)), accessed on 16 February 2025), screened the apparel category, and aggregated it daily. The final dataset has 1683 apparel sales records from 2 January 2013 to 15 August 2017, measured daily. It was split into training, validation, and test sets in a 7:1:2 ratio, with 1176, 168, and 336 records, respectively.  
During preprocessing, we first cleaned the data to remove missing values. Then, we standardized it to eliminate dimensional differences between features. Finally, we performed outlier detection to ensure data quality.  
There is a close correlation between apparel sales and fashion trends. Therefore, to predict sales trends more accurately, this paper introduces Google Trends data as an auxiliary variable in the sales prediction task. The multi-dimensional features of data are crucial for improving the accuracy of time-series forecasting. As a supplementary information source, Google Trends data has been proven to be capable of effectively capturing socioeconomic dynamics and consumer behavior patterns. The authors of [26; 27] jointly confirm the importance and effectiveness of Google Trends data in the apparel sales prediction task. By integrating multiple sales-related data sources, the model can comprehensively understand market dynamics, enabling more accurate sales predictions in the highly competitive fashion market.  
The economy of the region where the dataset is sourced is significantly dependent on the export of the oil industry. Therefore, fluctuations in international oil prices and the US dollar index have a significant impact on the country's macro-economy and consumption patterns. In this paper, we further expand the scope of data collection to include Google Trends data for keywords related to apparel categories in this region, aiming to uncover the potential correlations between consumer interests and economic variables. The features included in the dataset and their specific meanings are shown in Table 1.  
In feature engineering, we thoroughly analyzed the data to select features that best reflect apparel sales trends and related factors. We created multiple features, including historical sales data, the Google Trends index, oil prices, and the US Dollar Index, which are described in Table 1. Figure 1 shows the correlations between different variables in the final apparel sales dataset we built. To ensure the stationarity of the time series data, we conducted stationarity tests on all datasets. Specifically, we used the ADF (Augmented Dickey-Fuller) test to determine if the time series has a unit root and thus assess its stationarity. For non-stationary series, we applied differencing until the series met the stationarity requirements as indicated by the ADF test. Additionally, considering the common presence of seasonality in time series data, we also performed seasonal decomposition to further enhance the model's forecasting performance.