K-Nearest Neighbor Classifier for Classifying user Reviews on Social Media Networks


  • Fahad Alotaibi Department of Information System, King Adulaziz University, Jaddah, KSA
  • Nashwan Ahmed Alromema 1-Department of Information System, Faculty of Computing and Information Technology, King Abdulaziz University, Jeddah Saudi Arabia 2-Department of Software Engineering, Faculty of Computing, Universiti Teknologi Malaysia, Skudai Johor, Malaysia




Gigantic content generated on social media networking sites have made the online users enabled to communicate their opinions and sentiments about products and other entities like political events etc. Opinion mining applications aim to provide facilities to user and companies for know about products in which they are interested. In this work, opinion mining system for comparative reviews is developed using supervised machine learning approach. For this purpose, K-nearest neighbor classifier is trained on a publicly available dataset. Effectiveness of the system is validated by comparing its performance with other classifiers.


Asghar, M. Z., Kundi, F. M., Ahmad, S., Khan, A., Khan, F., 2018. T‐SAF: Twitter sentiment analysis framework using a hybrid classification scheme. Expert Systems 35(1), pp e12233.‏

Asghar, M. Z., Rahman, F., Kundi, F. M., Ahmad, S., 2019. Development of stock market trend prediction system using multiple regression. Computational and Mathematical Organization Theory, pp 1-31.

Bach, N. X., Van, P. D., Tai, N. D., Phuong, T. M., October. 2015. Mining Vietnamese comparative sentences for sentiment analysis. In 2015 Seventh international conference on knowledge and systems engineering (KSE) pp. 162-167. IEEE.

Bhavitha, B. K., Rodrigues, A. P., Chiplunkar, N. N., March. 2017. Comparative study of machine learning techniques in sentimental analysis. In 2017 International Conference on Inventive Communication and Computational Technologies (ICICCT) pp. 216-221. IEEE.

Ganapathi bhotla, M., Liu, B., 2008. Mining opinions in comparative sentences. In Proceedings of the 22nd International Conference on Computational Linguistics Association for Computational Linguistics 1, pp. 241-248.

Ghag, K., Shah, K., January. 2013. Comparative analysis of the techniques for Sentiment Analysis. In 2013 International Conference on Advances in Technology and Engineering (ICATE) pp. 1-7. IEEE.

Ismail, H., Harous, S., Belkhouche, B., 2016. A Comparative Analysis of Machine Learning Classifiers for Twitter Sentiment Analysis. Research in Computing Science 110, pp 71-83.

Jindal, N., Liu, B., July. 2006. Mining comparative sentences and relations. In AAAI 22(13311336), pp 9.

Jin, J., Ji, P., Gu, R., 2016. Identifying comparative customer requirements from product online reviews for competitor analysis. Engineering Applications of Artificial Intelligence 49, pp 61-73.

Joshi, R., Tekchandani, R., 2016 Comparative analysis of Twitter data using supervised classifiers. In Inventive Computation Technologies (ICICT), International Conference on IEEE 3, pp. 1-6.

Khan, A. U. R., Khan, M., Khan, M. B., 2016. Naïve Multi-label classification of YouTube comments using comparative opinion mining. Procedia Computer Science 82, pp 57-64.

Varathan, K. D., Giachanou, A., Crestani, F., 2017. Comparative opinion mining: a review. Journal of the Association for Information Science and Technology 68(4), pp 811-829.

Wang, W., Xin, G., Wang, B., Huang, J., Liu, Y., 2017. Sentiment information Extraction of comparative sentences based on CRF model. Computer Science & Information Systems 14(3).

Xu, K., Liao, S. S., Li, J., Song, Y., 2011. Mining comparative opinions from customer reviews for Competitive Intelligence. Decision support systems 50(4), pp 743-754.

Ejaz, A., Turabee, Z., Rahim, M., Khoja, S., December. 2017. Opinion mining approaches on Amazon product reviews: A comparative study. In 2017 International Conference on Information and Communication Technologies (ICICT) pp. 173-179. IEEE.

Syed AH, Khan T, Alromema N. A Hybrid Feature Selection Approach to Screen a Novel Set of Blood Biomarkers for Early COVID-19 Mortality Prediction. Diagnostics (Basel). 2022 Jun 30;12(7):1604. doi: 10.3390/diagnostics12071604. PMID: 35885508; PMCID: PMC9316550.




How to Cite

Alotaibi, F., & Alromema, N. A. (2022). K-Nearest Neighbor Classifier for Classifying user Reviews on Social Media Networks. VAWKUM Transactions on Computer Sciences, 10(1), 01–10. https://doi.org/10.21015/vtcs.v10i1.1177