Monte Carlo Dropout Neural Networks for Forecasting Sinusoidal Time Series: Performance Evaluation and Uncertainty Quantification
Abstract
:1. Introduction
2. Monte Carlo Dropout Neural Networks
2.1. Monte Carlo Dropout
- Aleatoric uncertainty, caused by inherent data noise such as measurement errors, is irreducible and can be modeled through predictive distributions obtained via multiple forward passes [11].
- Epistemic uncertainty, on the other hand, arises from limited training data and represents uncertainty in the model’s parameters.
2.2. Neural Network Model
2.3. Dropout Mechanism
2.4. MCDO as Approximation
2.5. Network Input and Implementation Details
3. Sinusoidal Models in Simulation Studies
3.1. Constant Amplitude with Trend
3.2. Varying Amplitude with Trend
3.3. Mixed Frequency with Trend
3.4. Phase Shift with Trend
3.5. Nonlinear Modulation with Trend
3.6. Noise Variability with Trend
4. Studied Settings
4.1. Simulation Models
- Model 1: Constant amplitude with trend, using a fixed amplitude of 5 units, representing a stable cyclic pattern.
- Model 2: Varying amplitude with trend, starting with an amplitude of 3 units, increasing linearly by 0.05 units per month, simulating intensifying seasonal effects.
- Model 3: Mixed frequency with trend, combining a primary cycle amplitude of 5 units with a secondary cycle amplitude of 3 units, capturing overlapping periodic patterns.
- Model 4: Phase shift with trend, initially set to zero for simplicity, but adaptable to simulate shifts in periodic events.
- Model 5: Nonlinear modulation with trend, incorporating a modulation depth of 0.5 to reflect additional cyclical influences.
- Model 6: Noise variability with trend, using a fixed amplitude of 5 units with stochastic noise modulation, modeling fluctuations in predictability over time.
4.2. Hyperparameter Grid
4.3. Model to Be Compared with MCDO NN
4.4. Comparison Criteria
- Root Mean Square Error (RMSE): RMSE measures the average magnitude of the errors between predicted and actual values [34]. It is defined as
- Mean Absolute Percentage Error (MAPE): MAPE measures the average absolute percentage difference between the predicted and actual values, expressed as a percentage. It is defined as
- This metric provides a scale-independent measure of forecast accuracy [35]. Lower MAPE values reflect better model performance.
- Coverage of Interval Forecasts (CIF): CIF refers to the proportion of times the actual values fall within the model’s predicted confidence intervals. For instance, a 95% interval should ideally contain the true values 95% of the time. This metric assesses how well the model quantifies uncertainty [36].
- Width of Forecast Intervals (WIF): WIF quantifies the average width of the prediction intervals. Narrower intervals suggest more precise forecasts, while wider intervals may indicate greater uncertainty [37]. When interpreted alongside CIF, WIF helps evaluate the sharpness and reliability of the interval predictions.
5. Results
5.1. Optimal Parameters for MCDO NNs
5.2. Performance of MCDO NNs
6. Application to a Real Dataset
6.1. Fit the Six Models to the AirPassengers Dataset
6.2. Hyperparameter Optimization
6.3. Performance Comparison
7. Conclusions and Discussions
- Forecasting Accuracy: Across all six sinusoidal models, MCDO consistently yielded lower RMSE and MAPE than SARIMA. In the phase shift model, RMSE dropped to 2.00 and MAPE to 3.12%, compared to SARIMA’s 12.56 and 21.78%, respectively. Likewise, in the nonlinear modulation model, MCDO achieved an RMSE of 1.79 versus 3.68.
- Uncertainty Quantification: MCDO produced narrower and more reliable prediction intervals while maintaining high coverage. For instance, in the constant amplitude model, its WIF was 22.94 versus SARIMA’s 33.58. Even in the challenging mixed frequency model, MCDO maintained 100% CIF while reducing WIF to 8.95 from SARIMA’s 10.07, demonstrating improved precision and efficiency.
- Adaptability to Sinusoidal Structures: Unlike SARIMA, which relies on predefined seasonal components and assumptions of stationarity, MCDO can learn periodic patterns directly from data. This adaptability enables the modeling of complex sinusoidal signals, including variations in amplitude, phase, and frequency, while capturing residual dynamics.
- Generalization Beyond Ideal Sinusoidal Patterns: While the simulated models assume ideal periodicity, many real-world time series deviate from such structure. MCDO remains effective in these settings, as it does not rely on strict model assumptions. Suitability of sinusoidal modeling can be assessed using tools such as decomposition, autocorrelation, or spectral analysis.
- Real-World Performance: Applied to the AirPassengers dataset, MCDO offered better forecast accuracy (RMSE: 32.42 vs. 37.59; MAPE: 5.79% vs. 6.21%) and better-calibrated intervals, achieving 91.67% CIF compared to SARIMA’s 66.67%, despite a wider prediction interval.
- Computational Efficiency: Compared to SARIMA, the MCDO model requires greater computational resources due to its neural network architecture and the use of multiple stochastic forward passes during inference. For the real-world AirPassengers dataset, inference with 20,000 passes on a consumer-grade laptop (Intel Core i9-13980HX processor, 64 GB RAM) took approximately 49.36 s, whereas SARIMA fitting and prediction completed in about 3.39 s. Despite the increased computational cost, MCDO provides additional benefits, including improved accuracy and more informative uncertainty quantification. Its efficiency can be further enhanced by reducing the number of forward passes or by leveraging parallel hardware such as GPUs.
- Future Applications and Federated Learning Potential: While this study focused on centralized learning, a promising direction for future research is the integration of MCDO into federated learning (FL) frameworks. Federated MCDO could enable decentralized forecasting across edge devices or distributed sensors while preserving data privacy. Recent studies have shown that ensemble-based strategies can enhance generalization and uncertainty quantification in FL settings [44,45]. Additionally, adaptive sampling and model fusion techniques have been proposed to improve performance under non-independent and identically distributed data conditions and communication constraints [46]. Ensemble learning has also demonstrated effectiveness in environmental forecasting contexts [47], suggesting further opportunities to apply MCDO in federated or distributed scenarios. Integrating MCDO into these approaches may offer a scalable and interpretable solution for privacy-preserving time series forecasting.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Brockwell, P.J.; Davis, R.A. Introduction to Time Series and Forecasting, 3rd ed.; Springer International Publishing: New York, NY, USA, 2016. [Google Scholar]
- Chatfield, C. The Analysis of Time Series: An Introduction, 6th ed.; Chapman and Hall/CRC: London, UK, 2003. [Google Scholar] [CrossRef]
- Seago, J.H.; Seidelmann, P.K. Mean Solar Time and Its Connection to Universal Time. In The Science of Time 2016; Arias, E.F., Combrinck, L., Gabor, P., Hohenkerk, C., Seidelmann, P.K., Eds.; Astrophysics and Space Science Proceedings; Springer: Cham, Switzerland, 2017; Volume 50, pp. 109–123. [Google Scholar] [CrossRef]
- Kundur, P. Power System Stability and Control; McGraw-Hill: New York, NY, USA, 1994. [Google Scholar]
- Tawadros, M.A. Sinusoidal Functions for Inventory Control Models. In Proceedings in Operations Research; Henke, M., Jaeger, A., Wartmann, R., Zimmermann, H.J., Eds.; Physica-Verlag HD: Heidelberg, Germany, 1972; Volume 1971. [Google Scholar] [CrossRef]
- Hickey, D.S.; Kirkland, J.L.; Lucas, S.B.; Lye, M. Analysis of Circadian Rhythms by Fitting a Least Squares Sine Curve. Comput. Biol. Med. 1984, 14, 217–223. [Google Scholar] [CrossRef] [PubMed]
- Erol, S. Time-Frequency Analyses of Tide-Gauge Sensor Data. Sensors 2011, 11, 3939–3961. [Google Scholar] [CrossRef]
- Griffiths, D.J.; Schroeter, D.F. Introduction to Quantum Mechanics, 3rd ed.; Cambridge University Press: Cambridge, UK, 2018. [Google Scholar]
- Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; MIT Press: Cambridge, MA, USA, 2016; Available online: http://www.deeplearningbook.org (accessed on 29 May 2024).
- Srisuradetchai, P.; Phaphan, W. Using Monte-Carlo Dropout in Deep Neural Networks for Interval Forecasting of Durian Export. WSEAS Trans. Syst. Control 2024, 19, 10–21. [Google Scholar] [CrossRef]
- Gal, Y.; Ghahramani, Z. Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning. In Proceedings of the 33rd International Conference on Machine Learning, New York, NY, USA, 20–22 June 2016; Balcan, M.F., Weinberger, K.Q., Eds.; PMLR: New York, NY, USA, 2016; Volume 48, pp. 1050–1059. Available online: https://proceedings.mlr.press/v48/gal16.html (accessed on 29 May 2024).
- Kendall, A.; Gal, Y. What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision? In Proceedings of the Advances in Neural Information Processing Systems (NIPS), Long Beach, CA, USA, 4–9 December 2017. [Google Scholar]
- Srivastava, N.; Hinton, G.; Krizhevsky, A.; Sutskever, I.; Salakhutdinov, R.R. Dropout: A Simple Way to Prevent Neural Networks from Overfitting. J. Mach. Learn. Res. 2014, 15, 1929–1958. [Google Scholar]
- Zhang, C.; Sun, S.; Yu, G. A Bayesian Network Approach to Time Series Forecasting of Short-Term Traffic Flows. In Proceedings of the 7th International IEEE Conference on Intelligent Transportation Systems, Washington, DC, USA, 4–6 October 2004; pp. 216–221. [Google Scholar] [CrossRef]
- Pearce, T.; Leibfried, F.; Brintrup, A. Uncertainty in Neural Networks: Approximately Bayesian Ensembling. In Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics, Online, 26–28 August 2020; Chiappa, S., Calandra, R., Eds.; PMLR: Westminster, UK, 2020; Volume 108, pp. 234–244. Available online: http://proceedings.mlr.press/v108/pearce20a/pearce20a.pdf (accessed on 29 May 2024).
- Blundell, C.; Cornebise, J.; Kavukcuoglu, K.; Wierstra, D. Weight Uncertainty in Neural Networks. arXiv 2015, arXiv:1505.05424. [Google Scholar] [CrossRef]
- Lemay, A.; Hoebel, K.; Bridge, C.P.; Befano, B.; De Sanjosé, S.; Egemen, D.; Rodriguez, A.C.; Schiffman, M.; Campbell, J.P.; Kalpathy-Cramer, J. Improving the Repeatability of Deep Learning Models with Monte Carlo Dropout. NPJ Digit. Med. 2022, 5, 174. [Google Scholar] [CrossRef]
- Atencia, M.; Stoean, R.; Joya, G. Uncertainty Quantification through Dropout in Time Series Prediction by Echo State Networks. Mathematics 2020, 8, 1374. [Google Scholar] [CrossRef]
- Sheng, C.; Zhao, J.; Wang, W.; Leung, H. Prediction Intervals for a Noisy Nonlinear Time Series Based on a Bootstrapping Reservoir Computing Network Ensemble. IEEE Trans. Neural Netw. Learn. Syst. 2013, 24, 1036–1048. [Google Scholar] [CrossRef]
- Khosravi, A.; Mazloumi, E.; Nahavandi, S.; Creighton, D.; Van Lint, J.W.C. Prediction Intervals to Account for Uncertainties in Travel Time Prediction. IEEE Trans. Intell. Transp. Syst. 2011, 12, 537–547. [Google Scholar] [CrossRef]
- Srisuradetchai, P.; Suksrikran, K. Random Kernel k-Nearest Neighbors Regression. Front. Big Data 2024, 7, 1402384. [Google Scholar] [CrossRef]
- Kendall, A.; Gal, Y.; Cipolla, R. Multi-Task Learning Using Uncertainty to Weigh Losses for Scene Geometry and Semantics. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 7482–7491. [Google Scholar]
- Papastefanopoulos, V.; Linardatos, P.; Panagiotakopoulos, T.; Kotsiantis, S. Multivariate Time-Series Forecasting: A Review of Deep Learning Methods in Internet of Things Applications to Smart Cities. Smart Cities 2023, 6, 2519–2552. [Google Scholar] [CrossRef]
- Mathonsi, T.; van Zyl, T.L. A Statistics and Deep Learning Hybrid Method for Multivariate Time Series Forecasting and Mortality Modeling. Forecasting 2022, 4, 1–25. [Google Scholar] [CrossRef]
- Kang, W.; Wang, D.; Jongbloed, G.; Hu, J.; Chen, P. Robust Transfer Learning for Battery Lifetime Prediction Using Early Cycle Data. IEEE Trans. Ind. Inform. 2025, 1–10. [Google Scholar] [CrossRef]
- Murphy, K.P. Machine Learning: A Probabilistic Perspective, 2nd ed.; MIT Press: Cambridge, MA, USA, 2021. [Google Scholar]
- Blei, D.M.; Kucukelbir, A.; McAuliffe, J.D. Variational Inference: A Review for Statisticians. J. Am. Stat. Assoc. 2017, 112, 859–877. [Google Scholar] [CrossRef]
- Kummaraka, U.; Srisuradetchai, P. Time-Series Interval Forecasting with Dual-Output Monte Carlo Dropout: A Case Study on Durian Exports. Forecasting 2024, 6, 616–636. [Google Scholar] [CrossRef]
- MacKay, D. Probable Networks and Plausible Predictions—A Review of Practical Bayesian Methods for Supervised Neural Networks. Netw. Comput. Neural Syst. 1995, 6, 469–505. [Google Scholar] [CrossRef]
- Zollanvari, A. Machine Learning with Python: Theory and Implementation; Springer: New York, NY, USA, 2023. [Google Scholar]
- Spanias, A.; Painter, T.; Atti, V. Audio Signal Processing and Coding; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2007. [Google Scholar] [CrossRef]
- Zuo, T.; Tang, S.; Zhang, L.; Kang, H.; Song, H.; Li, P. An Enhanced TimesNet-SARIMA Model for Predicting Outbound Subway Passenger Flow with Decomposition Techniques. Appl. Sci. 2025, 15, 2874. [Google Scholar] [CrossRef]
- Chaipitak, S.; Choopradit, B. Thai Baht and Chinese Yuan Exchange Rate Forecasting Models: ARIMA and SMA-ARIMA Comparison. Int. J. Anal. Appl. 2024, 22, 157. [Google Scholar] [CrossRef]
- Kamlangdee, P.; Srisuradetchai, P. Circular Bootstrap on Residuals for Interval Forecasting in K-NN Regression: A Case Study on Durian Exports. Sci. Technol. Asia 2025, 30, 79–94. Available online: https://ph02.tci-thaijo.org/index.php/SciTechAsia/article/view/255306 (accessed on 18 March 2025).
- Chai, T.; Draxler, R.R. Root mean square error (RMSE) or mean absolute error (MAE)? Arguments against avoiding RMSE in the literature. Geosci. Model Dev. 2014, 7, 1247–1250. [Google Scholar] [CrossRef]
- Srisuradetchai, P.; Dangsupa, K. On Interval Estimation of the Geometric Parameter in a Zero–Inflated Geometric Distribution. Thail. Stat. 2022, 21, 93–109. Available online: https://ph02.tci-thaijo.org/index.php/thaistat/article/view/248025 (accessed on 29 November 2024).
- Srisuradetchai, P.; Tonprasongrat, K. On Interval Estimation of the Poisson Parameter in a Zero-Inflated Poisson Distribution. Thail. Stat. 2022, 20, 357–371. Available online: https://ph02.tci-thaijo.org/index.php/thaistat/article/view/246346 (accessed on 13 January 2025).
- Bergmeir, C.; Benítez, J.M. On the Use of Cross-Validation for Time Series Predictor Evaluation. Inf. Sci. 2012, 191, 192–213. [Google Scholar] [CrossRef]
- Hyndman, R.J.; Athanasopoulos, G. Forecasting: Principles and Practice, 2nd ed.; OTexts: Melbourne, Australia, 2018; Available online: https://otexts.org/fpp2/ (accessed on 18 March 2025).
- Box, G.E.P.; Jenkins, G.M.; Reinsel, G.C. Time Series Analysis: Forecasting and Control, 3rd ed.; Holden-Day: San Francisco, CA, USA, 1976. [Google Scholar]
- Himakireeti, K.; Vishnu, T. Air Passengers Occupancy Prediction Using ARIMA Model. Int. J. Appl. Eng. Res. 2019, 14, 646–650. Available online: https://www.ripublication.com/ijaer19/ijaerv14n3_08.pdf (accessed on 18 March 2025).
- Ohri, A. Forecasting and Time Series Models. In R for Business Analytics; Springer: New York, NY, USA, 2012; p. 9. [Google Scholar] [CrossRef]
- Castaño Camps, E. Introduction to Time Series and Forecasting. Bachelor’s Thesis, Universitat de Barcelona, Barcelona, Spain, 2022. Available online: https://diposit.ub.edu/dspace/bitstream/2445/189584/2/tfg_casta%C3%B1o_camps_eloi.pdf (accessed on 18 March 2025).
- Xu, A.; Wang, R.; Weng, X.; Wu, Q.; Zhuang, L. Strategic Integration of Adaptive Sampling and Ensemble Techniques in Federated Learning for Aircraft Engine Remaining Useful Life Prediction. Appl. Soft Comput. 2025, 175, 113067. [Google Scholar] [CrossRef]
- Shi, N.; Lai, F.; Al Kontar, R.; Chowdhury, M. Fed-Ensemble: Ensemble Models in Federated Learning for Improved Generalization and Uncertainty Quantification. IEEE Trans. Autom. Sci. Eng. 2024, 21, 2792–2803. [Google Scholar] [CrossRef]
- Wang, J.; Hu, J.; Mills, J.; Min, G.; Xia, M.; Georgalas, N. Federated Ensemble Model-Based Reinforcement Learning in Edge Computing. IEEE Trans. Parallel Distrib. Syst. 2023, 34, 1848–1859. [Google Scholar] [CrossRef]
- Srisuradetchai, P.; Panichkitkosolkul, W. Using Ensemble Machine Learning Methods to Forecast Particulate Matter (PM2.5) in Bangkok, Thailand. In Multi-Disciplinary Trends in Artificial Intelligence; MIWAI 2022; Surinta, O., Yuen, K.K.F., Eds.; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2022; Volume 13651, pp. 199–210. [Google Scholar] [CrossRef]
- R Core Team. AirPassengers Dataset. R Package Datasets. 2023. Available online: https://stat.ethz.ch/R-manual/R-devel/library/datasets/html/AirPassengers.html (accessed on 18 March 2025).
RMSE | MAPE | WIF (MCDO vs. SARIMA) | |||
---|---|---|---|---|---|
Model | MCDO | SARIMA | MCDO | SARIMA | |
1. Constant Amplitude | 2.50 | 4.57 | 4.30% | 7.44% | 22.94 vs. 33.58 |
2. Varying Amplitude | 3.40 | 8.84 | 6.14% | 15.97% | 21.62 vs. 28.56 |
3. Mixed Frequency | 1.78 | 1.79 | 2.93% | 2.70% | 8.95 vs. 10.07 |
4. Phase Shift | 2.00 | 12.56 | 3.12% | 21.78% | 18.56 vs. 36.88 |
5. Nonlinear Modulation | 1.79 | 3.68 | 2.90% | 6.13% | 28.85 vs. 48.86 |
6. Noise Variability | 2.51 | 2.74 | 4.05% | 4.56% | 13.90 vs. 31.23 |
Model | RMSE (Original Scale) | R2 (Original Scale) |
---|---|---|
Model 1: constant amplitude | 25.27 | 0.943 |
Model 2: varying amplitude | 24.49 | 0.947 |
Model 3: mixed frequency | 17.59 | 0.973 |
Model 4: phase shift | 25.27 | 0.943 |
Model 5: nonlinear modulation | 25.22 | 0.944 |
Model 6: noise variability | 24.73 | 0.946 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Kummaraka, U.; Srisuradetchai, P. Monte Carlo Dropout Neural Networks for Forecasting Sinusoidal Time Series: Performance Evaluation and Uncertainty Quantification. Appl. Sci. 2025, 15, 4363. https://doi.org/10.3390/app15084363
Kummaraka U, Srisuradetchai P. Monte Carlo Dropout Neural Networks for Forecasting Sinusoidal Time Series: Performance Evaluation and Uncertainty Quantification. Applied Sciences. 2025; 15(8):4363. https://doi.org/10.3390/app15084363
Chicago/Turabian StyleKummaraka, Unyamanee, and Patchanok Srisuradetchai. 2025. "Monte Carlo Dropout Neural Networks for Forecasting Sinusoidal Time Series: Performance Evaluation and Uncertainty Quantification" Applied Sciences 15, no. 8: 4363. https://doi.org/10.3390/app15084363
APA StyleKummaraka, U., & Srisuradetchai, P. (2025). Monte Carlo Dropout Neural Networks for Forecasting Sinusoidal Time Series: Performance Evaluation and Uncertainty Quantification. Applied Sciences, 15(8), 4363. https://doi.org/10.3390/app15084363