Sales Forecasting in Retail Using Random Forest Regression: A Case Study on Walmart

Accurate sales forecasting is crucial for retail giants like Walmart to optimize inventory management, plan operations, and enhance customer satisfaction. This study aims to develop a robust machine learning model for predicting weekly sales at Walmart stores, focusing on identifying the most important predictive features and utilizing the Random Forest Regressor. Using a comprehensive dataset from Kaggle, we conducted thorough data preprocessing, including addressing missing values and encoding categorical variables. Recursive Feature Elimination (RFE) was employed to determine the most significant features. The Random Forest Regressor, chosen for its ability to handle complex relationships, was parameterized with 100 estimators and evaluated using metrics such as Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and R-squared (R2) score. The model achieved an R2 score of 0.9741, significantly outperforming a baseline model. Diagnostic plots confirmed the model's robustness, with errors following a normal distribution and residuals showing no discernible patterns. This research demonstrates the efficacy of machine learning, particularly the Random Forest Regressor, in enhancing sales forecasting accuracy in the retail sector, providing insights into feature importance and supporting strategic decision-making for inventory and operational planning. The paper concludes that the Random Forest Regressor significantly enhances Walmart's sales forecasting accuracy with a high R-squared score of 0.9741, outperforming baseline models and demonstrating robust predictive performance.

Authors

Institutions

Publication Details

Published
2025-04-13
DOI
https://doi.org/10.1109/iccit63348.2025.10989314
Primary Topic
Customer churn and segmentation
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Sales Forecasting in Retail Using Random Forest Regression: A Case Study on Walmart

Kaveh Faraji Googerdchi, Seyed Mohammadbagher Jafari
Customer churn and segmentation
article

Sales Forecasting in Retail Using Random Forest Regression: A Case Study on Walmart

Kaveh Faraji Googerdchi, Seyed Mohammadbagher Jafari
article en

Abstract

Accurate sales forecasting is crucial for retail giants like Walmart to optimize inventory management, plan operations, and enhance customer satisfaction. This study aims to develop a robust machine learning model for predicting weekly sales at Walmart stores, focusing on identifying the most important predictive features and utilizing the Random Forest Regressor. Using a comprehensive dataset from Kaggle, we conducted thorough data preprocessing, including addressing missing values and encoding categorical variables. Recursive Feature Elimination (RFE) was employed to determine the most significant features. The Random Forest Regressor, chosen for its ability to handle complex relationships, was parameterized with 100 estimators and evaluated using metrics such as Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and R-squared (R2) score. The model achieved an R2 score of 0.9741, significantly outperforming a baseline model. Diagnostic plots confirmed the model's robustness, with errors following a normal distribution and residuals showing no discernible patterns. This research demonstrates the efficacy of machine learning, particularly the Random Forest Regressor, in enhancing sales forecasting accuracy in the retail sector, providing insights into feature importance and supporting strategic decision-making for inventory and operational planning. The paper concludes that the Random Forest Regressor significantly enhances Walmart's sales forecasting accuracy with a high R-squared score of 0.9741, outperforming baseline models and demonstrating robust predictive performance.

University of Tehran (IR), Isfahan University of Art (IR)
Climate action
Openalex Percentile: Top 86%
Customer churn and segmentation
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.