Skip to content

Analysis and prediction of the sales data during Black Friday sale using some Machine Learning Algorithms.

Notifications You must be signed in to change notification settings

prateekagr21/Black-Friday-sales-prediction

Repository files navigation

Black-Friday-sales-prediction !!

Analysis and Prediction of Black Friday Sales using Machine Learning Algorithms

black friday2

Black Friday is an informal name used to describe the day after Thanksgiving. It's often the busiest shopping day of the year because it kicks off the holiday season. This season is crucial for the economy, especially for some retailers, such as jewelers.

According to the National Retail Federation (NRF), 84.2 million people shopped in stores on Black Friday in 2019, and 37.8 million people shopped in stores on Thanksgiving Day. A total of 189.6 million people shopped over the four-day Black Friday weekend in 2019, a 14% increase over 2018.1 Black Friday wasn't the biggest shopping day of the year in 2019, though. That honor went to Super Saturday, which is the Saturday before Christmas.

Black Friday is part of the holiday shopping season. Having a profitable Black Friday is essential for many retailers, especially toy and game stores. The holiday season amounts to almost 20% or more of annual sales for many retailers, according to the NRF.

Some retailers start their Black Friday sales on Thanksgiving Day, and deals typically run throughout the weekend. In 2019, shoppers spent an average of 361.90 dollars from Thanksgiving through Cyber Monday (the first Monday after Thanksgiving). To put that into perspective, shoppers were expected to spend about 1,007 dollars each during the entire holiday season in 2018.

In 2020, shoppers plan to spend about a Thousand Dollars on gifts, decorations, food, and other purchases for themselves and their families.

black friday1

For Solving this Usecase, What I have done is :

  • Collected the data and organized it to form a meaningful dataset.
  • Checked for null values and took care of it.
  • Observed the data to form meaningful insights!

  • Did Exploratory Data Analysis on the dataset.
  • Used correlations to form a heatmap.
  • Visualizations were made by using Matplotlib and Seaborn Libraries..!!

Did Data Pre-Processing :

  • Using Label Encoder
  • and Standard Scaler
    to fit and transform Numerical and Categorical Column values.

And then I made my model for the Prediction :

  • Did Data Preprocessing.
  • Independent and Dependent Features.
  • Did Train-Test split

Trained my Model using :

Linear Regressor

  • Fitted the model.
  • predicted the test scores and checked the same.
  • Plotted the prediction.
  • Prediction plot gave a Normal Distribution curve.
  • Plotted the Best fit line for the model...
  • Calculated Mean Absolute error and Root Mean Squared Error!

Random Forest Regressor

  • Fitted the model.!!!!
  • predicted the test scores.
  • Plotted the prediction.
  • Prediction plot gave a Normal Distribution curve.
  • Plotted the Important features which gave the prediction for the model...
  • Calculated Mean Absolute error and Root Mean Squared Error!

XGBoost Regressor

  • Fitted the model.
  • predicted the test scores.
  • Plotted the prediction.
  • Prediction plot gave a Normal Distribution curve.
  • Plotted the Important features which gave the prediction for the model...
  • Calculated Mean Absolute error and Root Mean Squared Error!

black friday3

And for the conclusion -

From the above three trained Models, It can be seen that the XGBoost Regressor model performed better than theRandomForestRegressor and Linear Regressor Model.


About

Analysis and prediction of the sales data during Black Friday sale using some Machine Learning Algorithms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages