Cluster-specific Bi-LSTM models for improved pharmaceutical sales forecasting - Hapsari, Indri (Journal Industrial Servicess, 2024)
In the pharmaceutical sector, accurate forecasting is imperative due to the diverse range of medicines. Inadequate inventory levels risk patient well-being, whereas excessive stock can result in financial waste. This study categorizes historical sales data from a Denpasar-based pharmacy industry into clusters via K-Means clustering, analyzing 106 medicines over 60 months, with 54 months for training and six for testing. Four distinct Bi-LSTM (Bidirectional Long Short-Term Memory) based forecasting models emerged, tailored to each cluster's characteristics. Cluster 0's model, with two input neurons and three hidden layers, underwent 220 epochs of training, achieving an MAE of (0.0835) and an MSE of (0.0165). Cluster 1's model, more intricate with ten input neurons and two hidden layers, was trained for 136 epochs, resulting in an MAE of (0.1299) and an MSE of (0.0309). Cluster 2's model resembled Cluster 0 but with reduced neurons in the hidden layers, trained for 20 epochs, yielding an MAE of (0.0899) and an MSE of (0.0380). Finally, Cluster 3's model featured two input neurons and a single hidden layer with 128 neurons, trained for 150 epochs, attaining an MAE of (0.0239) and an MSE of (0.094). Forecast application of Cluster 0's model for individual medicine using Bi-LSTM demonstrated its efficacy in predicting demand compared with machine learning forecast models such as Random Forest, Gradient Boosting, Support Vector Machine, and Neural Network. The model's adaptability to demand fluctuations can guide pharmacies in managing their inventory and optimizing supply chain operations, sales, marketing strategies, and product development.