lleisner / bakery_sales_forecasting

Bakery Sales Forecasting with the iTransformer architecture
2 stars 0 forks source link

Bakery Sales Forecasting

This repository contains the code and data used for demand forecasting in a bakery, leveraging advanced machine learning models like iTransformer and TiDE. The project aims to improve the accuracy of sales predictions to optimize production processes and reduce food waste.

Project Overview

This project applies machine learning models to forecast daily sales for a bakery located on a North Sea island. The focus is on using models like iTransformer and TiDE to predict sales based on various factors such as weather conditions, holidays, and tourist activity.

Directory Structure

Installation

To run this project, you need to have Python 3.10 installed. It is recommended to use a virtual environment to manage dependencies.

  1. Clone the repository:
    
    git clone https://github.com/lleisner/bakery_sales_forecasting.git
    cd bakery_sales_forecasting

Usage

To run the project, use the experiment.run script. This script allows you to configure various parameters for the machine learning models through command-line arguments.

Basic Usage

Run the project with default settings:

python -m experiment.run --dataset sales_forecasting_8h_top16 --models iTransformer TiDE Baseline

Command-Line Arguments

You can customize the run by specifying the following arguments:

Example Commands

Tune models with custom batch size and learning rate:

python -m experiment.run --batch_size 64 --learning_rate 0.0001 --dataset sales_forecasting_8h_top16 --models iTransformer TiDE --mode tune --loss amse

Load existing models for a specific dataset and evaluate:

python -m experiment.run --mode load --dataset sales_forecasting_8h_top16 --models TiDE