Reduce Fresh-Food Waste with an End-to-End ML Approach
C3 AIData Scientist · OnsiteLast updated
This problem tests the ability to design an integrated ML system that moves beyond simple demand forecasting by addressing inventory dynamics, supply constraints, and decision optimization.
Problem Statement
A national grocery retailer is struggling with significant food waste due to over-ordering of highly perishable items (e.g., berries, leafy greens). You are tasked with designing an end-to-end ML system to minimize waste while maintaining high service levels (minimizing stockouts).
Unlike standard forecasting models, you must account for the fact that historical sales data is 'censored'—we only observe realized sales, not true latent demand, because stockouts prevent us from knowing how much customers would have bought.
Design a system that:
- Models latent demand: How do you account for censored sales data in your training process?
- Optimizes inventory: Define an objective function that balances the cost of waste (expired goods) against the cost of lost sales.
- Integrates inventory flow: How do you incorporate current inventory levels, lead times, and shelf-life constraints into the decision loop?
- Validates performance: How do you evaluate the system offline before deploying it to a pilot store?
Include a high-level system architecture, the choice of loss functions, and a discussion on handling the trade-off between inventory holding costs and perishability.
Hints
Hint 1
Consider using a Tobit-style model or an Expectation-Maximization approach to estimate latent demand when inventory hits zero.
Hint 2
Define a profit-maximization objective function that includes the margin per unit and the loss associated with the salvage value or disposal cost of expired items.
Hint 3
Suggest a reinforcement learning approach or a stochastic programming model that treats the replenishment order as an action based on state variables like 'days-on-shelf' and 'current stock'.
Follow-up questions
- How would you handle cold-start problems for new inventory items with no historical sales data?
- If the store manager disagrees with the model's order quantity, how would you incorporate that 'human-in-the-loop' constraint?
- How does your system adjust if a supply chain disruption changes delivery lead times from 1 day to 3 days?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.