DOI QR코드

DOI QR Code

A Comparative Study of Machine Learning Algorithms Based on Tensorflow for Data Prediction

데이터 예측을 위한 텐서플로우 기반 기계학습 알고리즘 비교 연구

  • ;
  • 장성봉 (금오공과대학교 산학협력단)
  • Received : 2020.10.30
  • Accepted : 2021.01.14
  • Published : 2021.03.31

Abstract

The selection of an appropriate neural network algorithm is an important step for accurate data prediction in machine learning. Many algorithms based on basic artificial neural networks have been devised to efficiently predict future data. These networks include deep neural networks (DNNs), recurrent neural networks (RNNs), long short-term memory (LSTM) networks, and gated recurrent unit (GRU) neural networks. Developers face difficulties when choosing among these networks because sufficient information on their performance is unavailable. To alleviate this difficulty, we evaluated the performance of each algorithm by comparing their errors and processing times. Each neural network model was trained using a tax dataset, and the trained model was used for data prediction to compare accuracies among the various algorithms. Furthermore, the effects of activation functions and various optimizers on the performance of the models were analyzed The experimental results show that the GRU and LSTM algorithms yields the lowest prediction error with an average RMSE of 0.12 and an average R2 score of 0.78 and 0.75 respectively, and the basic DNN model achieves the lowest processing time but highest average RMSE of 0.163. Furthermore, the Adam optimizer yields the best performance (with DNN, GRU, and LSTM) in terms of error and the worst performance in terms of processing time. The findings of this study are thus expected to be useful for scientists and developers.

기계학습에서 정확한 데이터 예측을 위해서는 적절한 인공신경망 알고리즘을 선택해야 한다. 이러한 알고리즘에는 심층 신경망 (DNN), 반복 신경망 (RNN), 장단기 기억 (LSTM) 네트워크 및 게이트 반복 단위 (GRU) 신경망등을 들 수 있다. 개발자가 실험을 위해, 하나를 선택해야 하는 경우, 각 알고리즘의 성능에 대한 충분한 정보가 없었기 때문에, 직관에 의존할 수 밖에 없었다. 본 연구에서는 이러한 어려움을 완화하기 위해 실험을 통해 예측 오류(RMSE)와 처리 시간을 비교 평가 하였다. 각 알고리즘은 텐서플로우를 이용하여 구현하였으며, 세금 데이터를 사용하여 학습을 수행 하였다. 학습 된 모델을 사용하여, 세금 예측을 수행 하였으며, 실제값과의 비교를 통해 정확도를 측정 하였다. 또한, 활성화 함수와 다양한 최적화 함수들이 알고리즘에 미치는 영향을 비교 분석 하였다. 실험 결과, GRU 및 LSTM 알고리즘의 경우, RMSE(Root Mean Sqaure Error)는 0.12이고 R2값은 각각 0.78 및 0.75로 다른 알고리즘에 비해 더 낳은 성능을 보여 주었다. 기본 심층 신경망(DNN)의 경우, 처리 시간은 가장 낮지만 예측 오류는 0.163로 성능은 가장 낮게 측정 되었다. 최적화 알고리즘의 경우, 아담(Adam)이 오류 측면에서 최고의 성능을, 처리 시간 측면에서 최악의 성능을 보여 주었다. 본 연구의 연구결과는 데이터 예측을 위한 알고리즘 선택시, 개발자들에게 유용한 정보로 사용될 것으로 예상된다.

Keywords

References

  1. W. C. Wang, K. W. Chau, C. T. Cheng, and L. Qiu, "A comparison of performance of several artificial intelligence methods for forecasting monthly discharge time series," Journal of Hydrology, Vol.374, No.3, pp.294-306, 2009. https://doi.org/10.1016/j.jhydrol.2009.06.019
  2. A. M. Logar, E. M. Corwin, and W. J. B. Oldham, "A comparison of recurrent neural network learning algorithms," IEEE International Conference on Neural Networks, pp.1129-1134, 1993.
  3. A. Shrestha and A. Mahmood, "Review of deep learning algorithms and architectures," IEEE Access, Vol.7, pp.53040-53065, 2019. https://doi.org/10.1109/access.2019.2912200
  4. S. Hochreiter and J. Schmidhuber, "Long short-term memory," Neural Computation, Vol.9, No.8, pp.1735-1780, 1997. https://doi.org/10.1162/neco.1997.9.8.1735
  5. A. Sfetsos, "A comparison of various forecasting techniques applied to mean hourly wind speed time series," Renew Energy, Vol.21, No.1, pp.23-35, 2000. https://doi.org/10.1016/S0960-1481(99)00125-1
  6. C. L. Wu, K. W. Chau, and C. Fan, "Prediction of rainfall time series using modular artificial neural networks coupled with data-preprocessing techniques," Journal of Hydrology, Vol.389, No.1, pp.146-167, 2010. https://doi.org/10.1016/j.jhydrol.2010.05.040
  7. G. Li and J. Shi, "On comparing three artificial neural networks for wind speed forecasting," Applied Energy, Vol.87, No.7, pp.2313-2320, 2010. https://doi.org/10.1016/j.apenergy.2009.12.013
  8. T. Chai and R. R. Draxler, "Root mean square error (RMSE) or mean absolute error (MAE)?-Arguments against avoiding RMSE in the literature," Geoscience Model Development, Vol.7, No.3, pp.1247-1250, 2014. https://doi.org/10.5194/gmd-7-1247-2014
  9. T. Kluyver, "Jupyter Notebooks-a publishing format for reproducible computational workflows," Position Power Academy Publication, pp.87-90, 2016.
  10. R. Van, G. and F. L. Drake, "Python 3 Reference Manual," CreateSpace, 2009.
  11. G. Ariel, "pandas," pandas-dev/pandas: Pandas.
  12. G. Varoquaux, G. Buitinck, O. Louppe, F. Grisel, Pedregosa, and A. Mueller, "Scikit-learn," GetMobile Mobile Compututation. Community, Vol.19, No.1, 2015, pp.29-33.
  13. I. Shaft, J. Ahmad, S. I. Shah, and F. M. Kashif, "Impact of varying neurons and hidden layers in neural network architecture for a time frequency application," Proceedings of the 10th IEEE International Conference on Multitopic, pp.188-193, 2006.
  14. K. Shibata and Y. Ikeda, "Effect of number of hidden neurons on learning in large-scale layered neural networks," Proceedings of the International Joint Conference on ICCAS-SICE, pp.5008-5013, 2009.
  15. V. Sharma and T. Avinash, "Understanding Activation Functions in Neural Networks," Medium, Vol.4, No.12, pp.1-10, 2017.
  16. A. L. Maas, A. Y. Hannun, and A. Y. Ng, "Rectifier nonlinearities improve neural network acoustic models," In ICML Workshop on Deep Learning for Audio, Speech and Language Processing, Vol.28, 2013.
  17. D. P. Kingma and J. L. Ba, "Adam: A method for stochastic optimization," Proceedings of the 3rd International Conference on Learning and Representation, pp.1-15, 2015.
  18. M. C. Mukkamala and M. Hein, "Variants of RMSProp and adagrad with logarithmic regret bounds," Proceedings of the 34th International Conference on Machine Learning, Vol.5, pp.3917-3932, 2017.
  19. X. Zhang, L. Liu, L. Xiao, and J. Ji, "Comparison of Machine Learning Algorithms for Predicting Crime Hotspots," IEEE Access, Vol.8, pp.181302-181310, 2020. https://doi.org/10.1109/access.2020.3028420