An IoT-Driven Hybrid Stacking Ensemble with Deep Meta-Learning for Vending Machine Sales Forecasting
Abstract
Accurate sales prediction is essential for optimizing inventory management and supporting dynamic pricing strategies in the retail industry, particularly for vending machines (VMs) integrated with IoT technologies. The availability of real-time transactional and environmental data from IoT sensors provides opportunities to improve forecasting accuracy by capturing complex temporal patterns and external influences on consumer behavior. However, traditional time series models and single machine learning approaches often struggle to model nonlinear relationships and long-term dependencies in such data. This study proposes a hybrid stacking ensemble model that integrates machine learning and deep learning techniques to enhance the prediction of daily sales volume per Stock Keeping Unit (SKU) in IoT-enabled vending machines. The proposed framework employs Random Forest Regressor (RF), Support Vector Regression (SVR), and XGBoost Regressor (XGB) as Level-0 base learners. Their predictions, along with corresponding residuals, are utilized as meta-features for a Long Short-Term Memory (LSTM)-based meta-learner, enabling effective modeling of both nonlinear and temporal characteristics. The model incorporates diverse features derived from IoT data, including lagged sales, rolling statistics, temporal attributes (day of week and weekend indicators), and environmental variables such as temperature and humidity collected from IoT sensors. Hyperparameter optimization of the LSTM meta-model is performed using Optuna to improve model stability and generalization. The proposed approach is evaluated using 10-Fold Time Series Cross-Validation to preserve temporal data structure. Experimental results show that the proposed model achieves an R² of 0.9967 and an RMSE of 0.0899, outperforming the best individual base model, XGBoost (R² = 0.9946, RMSE = 0.1121). Although the improvement is marginal, it consistently demonstrates the advantage of combining machine learning and deep learning through a stacking ensemble strategy. These findings indicate that integrating meta-features, residual learning, and IoT-based feature engineering can improve predictive performance and support adaptive decision-making in real-time vending machine operations.
Article Metrics
Abstract: 68 Viewers PDF: 20 ViewersKeywords
Full Text:
PDFRefbacks
- There are currently no refbacks.

Journal of Applied Data Sciences
| ISSN | : | 2723-6471 (Online) |
| Publisher | : | Bright Publisher |
| Website | : | http://bright-journal.org/JADS |
| : | taqwa@amikompurwokerto.ac.id (principal contact) | |
| support@bright-journal.org (technical issues) |
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0




.png)