Skip to main contentSkip to navigation

Projects

Predicting the Availability of Product in a Supermarket, Ultimate Goal to Scale it to the Whole Country

By Syed Ahmed Basharat Ali.

A CatBoost model that predicts product availability across stores from historical stock data, to reduce stockouts.

Challenge

In a retail environment, the task was to predict product availability across stores from historical data, to reduce stockouts and improve inventory decisions. Client business details are not disclosed.

Approach

  • Extracted and prepared stock data from a PostgreSQL database using SQL and Python data processing libraries.
  • Built a classification model to predict availability from features such as store ID, product ID, days since last stock and remaining quantity.
  • Trained and evaluated the model, analyzed feature importance and serialized it for deployment.
  • Packaged the model with Docker and deployed it for real-time predictions.

Results

  • Remaining quantity and days since last stock were the strongest predictive features.
  • The model was evaluated on precision, recall and F1-score on held-out test data.

Technologies

Python (CatBoost, scikit-learn, pandas, NumPy), Docker, PostgreSQL, SQL, Matplotlib, Seaborn.

Impact

Supports better inventory management and can reduce stockouts as the model scales to more stores.