The Program is divided into several sections:
In general, there are four components of movement of the time series and each of them presents a distinct aspect of the behavior of the time series. They are:
Secular trend: a statistical tendency that can be easily identified as an overall long period.
Seasonality: such as monthly or weekly frequency of repetition.
Cyclical fluctuations: time series repeats periodically but not seasonal variations;
Irregular variations: which are other nonrandom sources of variations of series, such as on holidays, events.
In this project, We will use time-series forecasting to forecast store sales on data from Corporación Favorita, a large Ecuadorian-based grocery retailer by building a model that more accurately predicts the unit sales for thousands of items sold at different Favorita stores.
To improve the accuracy, we might evaluate and consider external impacts such as:
Holidays and Events.
Dates to pay wages in the public sector.
Major crisis (A magnitude 7.8 earthquake struck Ecuador on April 16, 2016).
Daily oil price (Ecuador is an oil-dependent country).
https://www.kaggle.com/linhhlp/store-sales-time-series-forecasting-full-analysis/
Database link on Kaggle
Full code hosted in GitHub
Forecasts are especially relevant to brick-and-mortar grocery stores, which must dance delicately with how much inventory to buy. Predict a little over, and grocers are stuck with overstocked, perishable goods. Guess a little under, and popular items quickly sell out, leading to lost revenue and upset customers. More accurate forecasting, thanks to machine learning, could help ensure retailers please customers by having just enough of the right products at the right time.
Current subjective forecasting methods for retail have little data to back them up and are unlikely to be automated. The problem becomes even more complex as retailers add new locations with unique needs, new products, ever-transitioning seasonal tastes, and unpredictable product marketing.
More accurate forecasting can decrease food waste related to overstocking and improve customer satisfaction. The results of this ongoing competition, over time, might even ensure your local store has exactly what you need the next time you shop.
First get local copies of the program:
$ git clone https://github.com/linhhlp/Store-Sales-Time-Series-Forecasting-Kaggle.git
Or download from: https://github.com/linhhlp/Store-Sales-Time-Series-Forecasting-Kaggle/archive/main.zip
This program has been developed and tested on:
The quickest, easiest way to install is to use Anaconda:
Install anaconda
The quickest, easiest way to install dependencies is to use the command line to create an environment and install the packages:
$ conda env create
$ source activate new_env
Install the remaining dependencies with:
conda install tensorflow sklearn seaborn
I would like to thank this people and other sources I have learned to complete this comprehensive model.
Kaggle: A very useful resouce with multiple and various types of content, from learning lession to free codes by other peoples.
https://www.kaggle.com/ekrembayar/store-sales-ts-forecasting-a-comprehensive-guide/notebook
https://www.kaggle.com/code/kashishrastogi/store-sales-analysis-time-serie