A Hybrid Machine Learning and Reinforcement Learning Framework for Adaptive Inventory Control
To accomplish better inventory management, a hybrid framework was created, which integrates Machine Learning (ML) and Reinforcement Learning (RL). A Temporal Fusion Transformer (TFT), trained using two years of retail data which included sales, pricing, promotions, weather conditions, and seasonal variations across various stores and products, was used to estimate demand. The forecasting model achieved a Mean Absolute Error (MAE) of 85.8717 and a Root Mean Squared Error (RMSE) of 109.7081, indicating the complexity and variability of the forecasting task across products and stores. The obtained predictions were added to the dataset and fed to a Soft Actor Critic (SAC) agent. An inventory simulation environment was then established that enabled the agent to learn daily ordering decisions without reference to the original Units Ordered values. The agent fine-tuned its behaviour as training progressed, maintaining realistic inventory levels while minimising unnecessary excess per store-product combination. TFT and SAC hyperparameters were optimised using Optuna to achieve improved performance. The system was tested under multiple real-world demand scenarios and demonstrated adaptability across varying demand patterns, where ML was used for demand estimation and RL for optimising the ordering policy.