Comparative Analysis of Naïve Bayes and K-Nearest Neighbors Algorithms in Predicting Public Interest in Electric Motorcycles
Abstract
Concerns about global warming and the need for sustainable transport solutions have led to the emergence of electric vehicles as an alternative to conventional vehicles. These vehicles offer cleaner and more efficient transportation, especially in urban areas. However, high costs in some countries, such as Indonesia, hinder their adoption. Electric motorcycle companies use previously recorded data to predict customer interest in purchasing their products. Based on these forecasts, business owners make decisions about the quantity of goods to supply. Researchers are increasingly using machine learning algorithms to study consumer behavior and predict demand for a variety of products, including electric motorcycles. The researchers have used this data-based method to analyze large amounts of consumer data, including online survey responses and reviews, as well as other sources. The study aims to perform a comparative analysis of the performance of the Naïve Bayes and K-Nearest Neighbors algorithms to predict public interest in electric motorcycles in Labuhanbatu district. We will perform a comparative analysis based on the performance evaluation matrix (accuracy, precision, recall, and f1 score) to determine the most suitable algorithm. The phases of the research methods included: data collection, exploratory data analysis, data preprocessing, splitting data, implementation of naïve bayes and k-nearest neighbors, and evaluation. The results showed that Naïve Bayes achieved an accuracy of 31.13%, precision of 83.33%, recall of 4.63%, and f1-score of 8.77%. In contrast, K-Nearest Neighbors attains an accuracy of 71.52% and a precision of 71.52%, recall 100%, and f1 score of 83,40%. According to the research results, K-nearest neighbors showed much better results in terms of accuracy, recall, and F1 scores. These results demonstrate that K-nearest neighbor is more effective in detecting public interest in electric motorcycles, and it strikes a better balance between identifying all positive cases and avoiding predictive errors.
Downloads
References
A. Habibie and W. Sutopo, “A Literature Review: Commercialization Study of Electric Motorcycle Conversion in Indonesia,” IOP Conf. Ser. Mater. Sci. Eng., vol. 943, no. 1, 2020, doi: 10.1088/1757-899X/943/1/012048.
M. Weiss, P. Dekker, A. Moro, H. Scholz, and M. K. Patel, “On the electrification of road transportation – A review of the environmental, economic, and social performance of electric two-wheelers,” Transp. Res. Part D Transp. Environ., vol. 41, pp. 348–366, 2015, doi: https://doi.org/10.1016/j.trd.2015.09.007.
S. Marwiyah and V. M. Rengganis, “Policy Formulation on Accelerating the Development of Electric Motor Vehicles,” Proc. Int. Conf. Democr. Natl. Resil. (ICDNR 2021), vol. 620, no. Icdnr, pp. 83–86, 2022, doi: 10.2991/assehr.k.211221.015.
D. S. Sulistyono, Yuniaristanto, W. Sutopo, and M. Hisjam, “Proposing Electric Motorcycle Adoption-Diffusion Model in Indonesia: A System Dynamics Approach,” J. Optimasi Sist. Ind., vol. 20, no. 2, pp. 83–92, 2021, doi: 10.25077/josi.v20.n2.p83-92.2021.
M. N. A. Jodinesa, W. Sutopo, and R. Zakaria, “Markov chain analysis to identify the market share prediction of new technology: A case study of electric conversion motorcycle in Surakarta, Indonesia,” AIP Conf. Proc., vol. 2217, no. 1, p. 30062, Apr. 2020, doi: 10.1063/5.0000817.
P. Kerdlap and S. H. Gheewala, “Electric Motorcycles in Thailand: A Life Cycle Perspective,” J. Ind. Ecol., vol. 20, no. 6, pp. 1399–1411, Dec. 2016, doi: https://doi.org/10.1111/jiec.12406.
P. Chutima and V. Tiewmapobsuk, “The Feasibility Study on the Infrastructure of Swapping Battery Station for Electric Motorcycles in Thailand,” IOP Conf. Ser. Earth Environ. Sci., vol. 811, no. 1, 2021, doi: 10.1088/1755-1315/811/1/012014.
L. Zhu, Q. Song, N. Sheng, and X. Zhou, “Exploring the determinants of consumers’ WTB and WTP for electric motorcycles using CVM method in Macau,” Energy Policy, vol. 127, pp. 64–72, 2019, doi: https://doi.org/10.1016/j.enpol.2018.12.004.
N. D. Andini, S. Z. Harahap, and M. Nasution, “Penerapan Machine Learning Algoritma Regresi Linear untuk Memprediksi Sahan Bank BNI,” INFORMATIKA, vol. 12, no. 2, pp. 162–169, 2024, doi: https://doi.org/10.36987/informatika.v12i2.5649.
M. Munif, M. Mustain, and K. Yahya, “Analysis of the K-Nearest Neighbor Algorithm to Determine the Prediction of Tofu Production,” Appl. Technol. Comput. Sci. J., vol. 5, no. 1, pp. 57–64, 2022, doi: 10.33086/atcsj.v5i1.3677.
S. A. Afolalu, B. B. Matthew, S. O. Ongbali, A. Abdulkareem, M. E. Emetere, and O. U. Iheanetu, “Overview impact of planning in production of a manufacturing sector,” IOP Conf. Ser. Mater. Sci. Eng., vol. 1036, no. 1, p. 012060, 2021, doi: 10.1088/1757-899x/1036/1/012060.
S. A. Afolalu et al., “The Role of Production Planning in Enhancing an Efficient Manufacturing System - An Overview,” E3S Web Conf., vol. 309, 2021, doi: 10.1051/e3sconf/202130901002.
P.-S. Chen, F.-Y. Tseng, and J. C.-M. Chen, “Determining production capacity planning in the stochastic demand environment for the food processing manufacturers: A case study,” J. Inf. Optim. Sci., vol. 42, no. 5, pp. 909–936, Jul. 2021, doi: 10.1080/02522667.2020.1800789.
S. E. Dincer and E. Demir, “Determining the faulty and refund products in manufacturing system: application on a textile Firm,” Pressacademia, vol. 7, no. 3, pp. 178–187, 2020, doi: 10.17261/pressacademia.2020.1281.
X. Zhang, Y. Hu, J. Deng, H. Xu, and H. Wen, “Feature Engineering and Artificial Intelligence-Supported Approaches Used for Electric Powertrain Fault Diagnosis: A Review,” IEEE Access, vol. 10, pp. 29069–29088, 2022, doi: 10.1109/ACCESS.2022.3157820.
P. Ndikum, “Machine Learning Algorithms for Financial Asset Price Forecasting,” pp. 1–16, 2020, [Online]. Available: http://arxiv.org/abs/2004.01504
I. Kazancoglu, M. Ozbiltekin-Pala, S. K. Mangla, A. Kumar, and Y. Kazancoglu, “Using emerging technologies to improve the sustainability and resilience of supply chains in a fuzzy environment in the context of COVID-19,” Ann. Oper. Res., vol. 322, no. 1, pp. 217–240, 2023, doi: 10.1007/s10479-022-04775-4.
D. Proserpio et al., “Soul and machine (learning),” Mark. Lett., vol. 31, no. 4, pp. 393–404, 2020, doi: 10.1007/s11002-020-09538-4.
L. Ma and B. Sun, “Machine learning and AI in marketing – Connecting computing power to human insights,” Int. J. Res. Mark., vol. 37, no. 3, pp. 481–504, 2020, doi: https://doi.org/10.1016/j.ijresmar.2020.04.005.
N. S. Pearre, W. Kempton, R. L. Guensler, and V. V Elango, “Electric vehicles: How much range is required for a day’s driving?,” Transp. Res. Part C Emerg. Technol., vol. 19, no. 6, pp. 1171–1184, 2011, doi: https://doi.org/10.1016/j.trc.2010.12.010.
S. Modi, J. Bhattacharya, and P. Basak, “Convolutional neural network–bagged decision tree: a hybrid approach to reduce electric vehicle’s driver’s range anxiety by estimating energy consumption in real-time,” Soft Comput., vol. 25, no. 3, pp. 2399–2416, 2021, doi: 10.1007/s00500-020-05310-y.
M. W. Dela Utami, Yuniaristanto, and W. Sutopo, “Adoption Intention Model of Electric Vehicle in Indonesia,” J. Optimasi Sist. Ind., vol. 19, no. 1, pp. 70–81, 2020, doi: 10.25077/josi.v19.n1.p70-81.2020.
S. K. Dixit and A. K. Singh, “Predicting Electric Vehicle (EV) Buyers in India: A Machine Learning Approach,” Rev. Socionetwork Strateg., vol. 16, no. 2, pp. 221–238, 2022, doi: 10.1007/s12626-022-00109-9.
S. Afandizadeh, D. Sharifi, N. Kalantari, and H. Mirzahossein, “Using machine learning methods to predict electric vehicles penetration in the automotive market,” Sci. Rep., vol. 13, no. 1, p. 8345, 2023, doi: 10.1038/s41598-023-35366-3.
S. Suryani, M. F. Fayyad, D. T. Savra, V. Kurniawan, and B. H. Estanto, “Sentiment Analysis of Towards Electric Cars using Naive Bayes Classifier and Support Vector Machine Algorithm,” Public Res. J. Eng. Data Technol. Comput. Sci., vol. 1, no. 1, pp. 1–9, 2023, doi: 10.57152/predatecs.v1i1.814.
V. M. R., R. Ashok, and L. Nitha, “Electric Vehicles Acceptance and Knowledge Identification in India using Naive Bayes and k-Nearest Neighbor Classifiers,” Int. J. Innov. Technol. Explor. Eng., vol. 9, no. 5, pp. 1630–1633, 2020, doi: 10.35940/ijitee.e3008.039520.
Copyright (c) 2024 International Journal of Science, Technology & Management

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