Predicting Retail Customer Purchase Patterns Using the Long Short-Term Memory Model
DOI:
https://doi.org/10.36526/ztr.v8i3.9555Keywords:
Long Short-Term Memory, Machine Learning, time series, RetailAbstract
Changes in shopping behavior after the COVID-19 pandemic have created new challenges for inventory management and operational planning in the retail sector. This study aims to predict monthly customer purchasing patterns at the Aneka Vita Store from 2022 to 2024 using four forecasting models: Long Short-Term Memory (LSTM), ARIMA/SARIMA, Prophet, and Random Forest, with Seasonal Naive as a baseline. Sales data were collected from the TumbasMX Point of Sale system, followed by data cleaning, monthly aggregation, and Min-Max normalization before model training. The dataset was divided into 36 months (January 2022 – December 2024) for training and 4 months (January – April 2025) for testing, with LSTM configured using a stacked architecture of two hidden layers (50 neurons each), dropout regularization (0.2), Adam optimizer, and early stopping. Model performance was evaluated using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and Mean Absolute Percentage Error (MAPE). The experimental results show that the LSTM model achieves the highest prediction accuracy, with MAPE of 23.31%, RMSE of 55.262, and MAE of 42.669, outperforming Prophet (MAPE 27.54%, RMSE 73.838), ARIMA/SARIMA (MAPE 50.92%, RMSE 115.804), and Random Forest (MAPE 57.06%, RMSE 66.582). These findings demonstrate that machine learning, particularly LSTM, can effectively support data-driven decision-making for inventory control and marketing strategies in retail businesses, especially in small-scale local retail contexts with limited transaction data. The study addresses the research gap in systematic comparative studies of forecasting models in small-scale retail environments with constrained data.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Tio Oktavianus, Antoni Wibowo

This work is licensed under a Creative Commons Attribution 4.0 International License.











