Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Store-Sales-Prediction-Using-ML-and-Python

A9bstract: In this project Store Sales Prediction using machine learning and python, the task is to predict the sales of different stores based on the attributes available in the dataset. Predictive analytics can help us to study and discover the factors that determine the number of sales that a retail store will have in the future by using different machine learning techniques and trying to determine the best algorithm suited to our particular problem statement. We have implemented normal regression techniques and as well as boosting techniques in our approach and have found that the boosting algorithms have better results than the regular regression algorithms.

Introduction: Sales prediction is an important part of modern business intelligence. It can be a complex problem, especially in the case of lack of data, missing data, and the presence of outliers. Sales prediction is rather a regression problem than a time series problem. Practice shows that the use of regression approaches can often give us better results compared to time series methods. Machine-learning algorithms make it possible to find patterns in the time series. We can find complicated patterns in the sales dynamics, using supervised machine-learning methods. Some of the most popular are tree-based machine-learning algorithms.

Methodology: During data exploration for insights, while opening the data, it is found that there were many stores that were not open. Thus it is confirmed that there were no closed stores with sales, and that there were no open stores with no sales and could safely remove them from the data set. Then that sales would scale with the number of customers on that day. Thus by plotting the trend, it is able to confirm that there was a correlation between customers and sales. Continuing with this insight, it is able to separate them by the day of week, confirming that some days were correlating more strongly than others. It has been noted that there were no easter holiday data set in state holidays, thus making any test data containing Easter holiday harder to predict accurately. Additionally, having promotions had an impact on sales, but school holidays did not impact sales much. Then by exploring the data it is found that certain store types correlated better with sales and customers. Given that many of the data set had discrete components such as day, week, day of week, year, assortment, store type, whether they had a promotion or not, it would seem that decision trees would be a good step to begin on. A decision tree model would also enable me to realise the importance of certain features. Which later proved that, as it did appear that customers had a big impact on sales, along with average sales per customer. By continuing using the ensemble methods such as Adaboost and Random Forest, which gave an improvement of 0.0608 and 0.0599 respectively on the validation set. Indeed, Random Forests’ variance decreased as compared to adaboost method. The module XGBoost used gradient boosted trees is used to predict the score.

Result: Adaboost gave better score and variance sometimes versus Random Trees. But the XGBoost gave great results with the existing data set. Interestingly, the features that XGBoost chose did not have the same ranking as other models. Average sales per month or per day of week did not give me an increase, most likely due to extrapolating data where there wasn’t any in test set, leading to over fitting. By this the prediction is being made for the stores.

About

A machine learning project that predicts store sales using regression and boosting models. Includes data cleaning, feature engineering, model comparison, and performance evaluation to identify the best algorithm for accurate sales forecasting.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages