Back to Projects

Perishable Demand Predictor

Python XGBoost Streamlit Google Gemini AI Business Intelligence

Overview

FrostMart UK faces a critical challenge, managing perishable goods efficiently. This project delivers an end‑to‑end machine learning and data‑driven solution that predicts weekly product demand, minimizes waste, and empowers procurement teams with actionable recommendations.

The Core Problem: An estimated annual financial loss of £12.2M due to product wastage and overstocking, representing approximately 4.77% of total revenue.

Key Features

Model Performance & Evaluation

I evaluated multiple algorithms to find the optimal balance between speed and accuracy. The Gradient Boosting Regressor (XGBoost) emerged as the superior model.

Model R² Score RMSE MAE MAPE
Linear Regression 0.63 21.5 19.8 5.4%
Random Forest 0.82 15.3 12.7 3.2%
Gradient Boosting 0.9959 75.28 16.27 0.86%

FrostMart UK Business Insights Report

Prepared by: Francis Afful Gyan, Business Intelligence Specialist | Date: November 2025

1. Executive Summary

This report provides a comprehensive analysis of FrostMart UK's operational performance for the fiscal year 2024-2025, with a primary focus on sales, product wastage, and the evaluation of my newly developed predictive demand forecasting model.

My analysis reveals that while FrostMart UK maintains a strong market position with an estimated annual revenue of £255,716,700.00, significant financial inefficiencies exist. The most critical issue identified is product wastage, which currently results in an estimated annual loss of £12,200,000.00, representing approximately 4.8% of total revenue. The Bakery category and the London region have been identified as the primary contributors to this loss.

In response, I have successfully developed and deployed a machine learning model for demand forecasting, which demonstrates exceptional accuracy with an R-squared value of 0.9959 and a Mean Absolute Percentage Error of just 0.86%. The implementation of this tool presents a transformative opportunity for FrostMart UK. By leveraging its predictive capabilities, I project a potential reduction in overall wastage by 30% to 40% and a corresponding revenue uplift of 10% to 20% through improved stock availability and optimized promotions.

Annual Revenue

£255.7M

Annual Loss (Waste)

£12.2M

Projected Savings

£4.8M

Model Accuracy

99.6%

2. Financial Performance Analysis

A detailed examination of FrostMart UK's financial data highlights a robust revenue stream counterbalanced by significant operational costs, primarily driven by product spoilage and overstocking. The direct financial impact of wastage represents a substantial inefficiency within our supply chain.

Further analysis into our marketing expenditure reveals areas for optimization. The correlation between marketing spend and sales volume is currently very low at 0.041, indicating that current marketing strategies are not effectively translating into proportional sales growth. Conversely, my analysis of promotional activities shows a clear and positive impact; a 25% discount has been proven to generate an average sales uplift of 51.3%.

3. Product Category Performance

Analysis at the product category level reveals significant performance disparities:

  • Dairy: Top-performing segment. "Mozzarella 250g" sold over 2.09 million units.
  • Bakery: Most problematic, exhibiting the highest wastage rate at 14.7%. Products like "White Sandwich Loaf" are the largest contributors due to short shelf life.
  • Meat: Highest average price per item (£7.27). Wastage here has a disproportionately large financial impact.
  • Beverages: Lowest risk profile with an average shelf life of 216.8 days, acting as a logistical buffer.

4. Regional Sales and Wastage Trends

Geographical analysis indicates that the London region is the largest contributor to our overall wastage problem despite high sales volume. The high population density and sales velocity are coupled with logistical complexities, resulting in a wastage rate considerably higher than the national average. This makes London the top priority for the rollout of new inventory management tools.

My analysis also incorporated environmental factors. Average temperature and rainfall were identified as significant predictors in my demand model, confirming that weather patterns have a measurable impact on consumer purchasing behavior.

5. Demand Forecasting Model Evaluation

To address the core challenge of product wastage, I developed a sophisticated demand forecasting model. The model achieved an R-squared (R²) value of 0.9959, indicating it can explain 99.59% of the variability in sales demand. Furthermore, the accuracy is confirmed by a MAPE of 0.86%.

The most influential predictors identified by the model are, in order of importance: Shelf Life, Average Temperature, Marketing Spend, Product Category, and Rainfall.

6. Supply Chain and Inventory Insights

The findings confirm that shelf life is the single most important predictor of wastage. For short shelf-life products (Bakery, Produce), a just-in-time replenishment approach is imperative, now feasible due to the model's high accuracy. For long-shelf-life products, we can maintain strategic inventory levels to hedge against supply chain disruptions.

7. Strategic Recommendations

Implement Dynamic, AI-Guided Replenishment for High-Risk Categories

Action: Mandate the use of the new Streamlit forecasting application for all daily and weekly ordering processes within the Bakery and fresh Meat categories across all stores.

Target: Reduce Bakery wastage from 14.7% to < 9.0% in 6 months.

Launch a Targeted Wastage Reduction Initiative in the London Region

Action: Establish a pilot program in London to fully integrate the AI forecasting tool with store-level operational workflows.

Target: Decrease London wastage rate by 5% in 1 fiscal year.

Optimize Promotional Strategy and Execution

Action: Standardize the use of the 25% discount level for key promotional events, as it has proven to be the most effective at lifting sales.

Target: Increase sales uplift by 10% while reducing post-promo waste.

Re-evaluate and Reallocate Marketing Investment

Action: Shift a significant portion of the budget towards the first quarter (January to March), which has been identified as the period of highest marketing effectiveness.

Target: Improve marketing efficiency by 20% in 12 months.

8. Conclusion

FrostMart UK is at a pivotal juncture. The annual loss of £12.2M is a clear signal for urgent action. The development and successful validation of my advanced demand forecasting model provides a powerful, data-driven solution. By embracing these changes, I realistically expect to reduce waste by up to 40% and increase revenue by up to 20%. The successful execution of these strategies will not only reclaim millions in lost profit but will also solidify FrostMart UK's position as a technologically advanced leader in the grocery sector.