Harnessing Exponential Moving Average for Time Series Forecasting: Predicting Website Traffic with XGBoost
Jhiro Faran, Agung Triayudi · 2024
In today’s fast-paced digital landscape, accurate and efficient website traffic forecasting is crucial for resource optimization and business operations. Traditional models often struggle to capture short-term trends and patterns in small datasets. This study addresses the urgent need to enhance forecasting accuracy by incorporating Exponential Moving Average, a method known for its responsiveness to recent changes in data, into XGBoost, a highly efficient machine learning algorithm. The research focuses on a dataset of $\mathbf{2, 1 6 7}$ records spanning from September 2014 to August 2020, developing three models with all features including EMA, with selected features, and excluding EMA. These models were evaluated using Mean Absolute Error, Root Mean Square Error, and Mean Absolute Percentage Error. The model with EMA features significantly outperformed the others, achieving an MAE of 111.612, RMSE of 152.931, and MAPE of $1.846 \%$, while the model without EMA had an MAE of 338.904 and MAPE of $5.606 \%$. These results demonstrate the critical role of EMA in capturing dynamic trends in website traffic, making it an essential feature for accurate forecasting in today’s rapidly evolving online environments.