An application for forecasting direct-to-consumer sales quantities using the NeuralProphet algorithm from Meta.
Project description
D2C Marketplace Sales Forecaster
Welcome to the D2C Marketplace Sales Forecaster! This Streamlit application utilizes the Neural Prophet model to predict sales for various products. Designed with non-technical users in mind, this app guides you through the entire process of loading data, selecting products, tuning and training the model, generating forecasts, and distributing size forecasts.
Table of Contents
Overview
The D2C Marketplace Sales Forecaster app is designed to help you predict sales for products in a direct-to-consumer (D2C) marketplace. With an easy-to-use interface and step-by-step guidance, you'll be able to generate accurate sales forecasts for your products. The application is built using Streamlit and leverages the [NeuralProphet] (https://neuralprophet.com/) algorithm developed by Meta research to provide flexible forecasting options and interpretable results.
Developed as a capstone for the UCSD Professional Extension, Machine Learning Engineering certification.
- What is the problem?
Forecast product-level sales by day for footwear and apparel digital marketplace sellers.
- Why solve for it?
Online sellers face challenges in tracking inventory across multiple platforms, which can lead to overselling and increased inventory costs. They are limited in how many times per day each platform can be updated with available inventory balances. By more accurately predicting sales, sellers can allocate inventory more efficiently, maximize revenue, and minimize costs. As an additional benefit, the by-day forecasts can assist in more accurately planning warehouse labor and save logistics operational costs for the seller as well.
- Unique problems for D2C Digital Sales Forecasting
E-commerce sales forecasting faces specific challenges that this application aims to address leveraging similar-product alignment and hierarchical planning methods.
-Strong seasonality and trend to the sales -Cold Start problem for new products that have no sales history -Insufficient data at the lowest level of granularity such as a EAN/UPC or size-level to be able to train machine learning models reliably
Getting Started
To begin using the application, follow these steps:
- Clone this repository to your local machine:
git clone https://github.com/rhanderh/d2c_mp_sales_forecaster.git
- Change to the cloned directory:
cd d2c_mp_sales_forecast_streamlit
- Install the required dependencies:
pip install -r requirements.txt
- Start the Streamlit application by running the following command:
streamlit run src/d2c_mp_sales_forecaster/D2CMPForecaster.py
- The application should now be running in your browser. Follow the instructions in each page to perform sales forecasting.
Application Pages
The application consists of five main pages that guide you through the sales forecasting process.
1. Load Data
In this first step, you'll upload your sales data to the application. The data should be in CSV format with columns representing dates, product identifiers, and sales quantities.
2. Product Selection
After loading the data, you'll be presented with a list of products from the dataset. Choose the product(s) you want to forecast sales for by selecting them from the list.
3. Tune and Train
In this step, you'll have the option to fine-tune the Neural Prophet model's hyperparameters to improve the sales forecast accuracy. You can either use the default settings or adjust the parameters as needed. Once you're satisfied with the configuration, click the "Train Model" button to train the model using your selected product data.
4. Forecast Product
With the trained model, you can now generate sales forecasts for the selected products. Choose a forecast horizon (e.g., next 30 days) and click the "Generate Forecast" button. The application will display the forecasted sales along with confidence intervals for the selected period.
5. Distribute Size Forecasts
In the final step, you can allocate the forecasted sales quantities across various product sizes based on historical data or custom distribution rules. You can input the percentage distribution for each size and click "Distribute Sizes" to generate the final size-wise sales forecast.
Contributing
Contributions are welcome to improve the D2C Marketplace Sales Forecaster. If you have any suggestions, bug reports, or feature requests, please open an issue or submit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for d2c_mp_sales_forecaster-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35c4a88447842fb68cae8a0303a2eaaf1932cd543917c5554046dfbb822141e7 |
|
MD5 | 02c4f959cd82963b86140747a2c9ed65 |
|
BLAKE2b-256 | fadd76a64ea74d1ad2e69b5041dddc50ac206dbfd6de93aa642f65240befbba0 |
Hashes for d2c_mp_sales_forecaster-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8ce3b8d5f08d1573018f984c8dd0a810e128df48cb76cdc60b520c301a38571 |
|
MD5 | 647d156d70b9afe5ed366be9d6050c47 |
|
BLAKE2b-256 | cc20f3c6fc677e87e07ca5f326b8ca9b212842fee7111d72e35663c294af173f |