- Introduction
- Why Time Series Forecasting for Inventory and Sales?
- Workflow Overview
- Detailed Task Breakdown
- 4.1. Set Up Google Colab
- 4.2. Load and Explore the Dataset
- 4.3. Data Preprocessing
- 4.4. Feature Engineering
- 4.5. Implement Classical Time Series Methods
- 4.6. Apply Machine Learning Approaches
- 4.7. Model Evaluation and Cross-Validation
- 4.8. Develop an Ensemble Model (Optional)
- 4.9. Hyperparameter Tuning (Optional)
- 4.10. Create an Interactive Dashboard (Optional)
- Deliverables
- Submission Guidelines
- Resources
Welcome to Week 2 of the AI/ML Development Track. This week, you'll develop time series forecasting models for inventory management and sales prediction. You will use various classical and machine learning approaches to build robust models that can help in accurate forecasting.
Effective inventory management and accurate sales forecasting are critical for any business. Traditional methods may fail to capture complex patterns and trends in the data.
Time series forecasting models, especially when combined with machine learning approaches, can adapt to changes and provide more precise predictions, leading to better decision-making and cost savings.
- Set up Google Colab for the project.
- Load and explore a suitable dataset.
- Preprocess data and engineer features.
- Implement classical time series methods (ARIMA, SARIMA).
- Apply machine learning approaches (Prophet, LSTM).
- Evaluate models using cross-validation.
- (Optional) Perform hyperparameter tuning using Optuna.
- (Optional) Develop an ensemble model.
- (Optional) Create an interactive dashboard using Streamlit or Gradio.
- Access Google Colab and create a new notebook.
- Ensure that you enable GPU support if needed.
- Google Colab Quick Start Guide
- Search for a suitable time series dataset on platforms like Kaggle.
- You HAVE to get a time-series dataset. Example datasets are given below.
- Use
pandas
to load and explore the dataset. - Kaggle Datasets
- Superstores Dataset
- Ecuador Stores Sales Dataset (This is a more complex, fun dataset)
- Handle missing values, encode categorical variables, and normalize numerical features.
- Use
pandas
for data cleaning and transformation. - Pandas Data Cleaning Tutorial
- Create new features based on date-time information (e.g., day of the week, month, etc.).
- Can you incorporate external factors such as holidays or promotions?
- Pandas for Date-Based Features
- ARIMA (Autoregressive Integrated Moving Average): ARIMA models explain a given time series based on its own past values (autoregressive part), the difference between values (integrated part), and lagged forecast errors (moving average part). It is denoted as ARIMA(p, d, q), where p is the number of lag observations, d is the number of times that the raw observations are differenced, and q is the size of the moving average window.
- SARIMA (Seasonal ARIMA): SARIMA extends ARIMA by adding support for seasonality in the data. It includes additional seasonal terms denoted as (P, D, Q, S), where P is the seasonal autoregressive order, D is the seasonal differencing order, Q is the seasonal moving average order, and S is the length of the seasonal cycle.
- ARIMA Tutorial
- Cheat Sheet: Time Series Approaches
- Try using Prophet for automatic forecasting.
- Implement LSTM networks using Keras for sequence prediction.
- Prophet Documentation
- Keras LSTM Tutorial
- Use Scikit-learn's TimeSeriesSplit for cross-validation.
- Evaluate models using metrics like MAE, RMSE, and MAPE.
- Scikit-learn TimeSeriesSplit
- Combine multiple forecasting techniques using VotingRegressor. See if this results in better accuracy!
- Scikit-learn VotingRegressor
- Try using Optuna for automated hyperparameter tuning.
- Optuna Documentation
- Use Streamlit or Gradio to create a dashboard for visualizing inventory predictions and sales forecasts.
- Streamlit Documentation
- Gradio Documentation
- Google Colab notebook with the entire inventory prediction and sales forecasting pipeline.
- A concise Markdown report discussing your approach, challenges, and results.
- (Optional) Python script for the interactive dashboard.
- Share your Google Colab notebook as a link, or ipynb file.
- Submit your report as a md file.
- (Optional) Submit your dashboard script as a py file.