نوع مقاله : مقاله پژوهشی

نویسنده

دانشیار، گروه طراحی شهری، دانشکده معماری و شهرسازی، دانشگاه هنر، تهران،‌ ایران/ پژوهشگر، گروه آمار، دانشکده ریاضی، دانشگاه واترلو، واترلو، کانادا.

چکیده

تحلیل احساسات کاربران از طریق شبکه‌‌های مجازی، به‌‌حوزه‌‌ای موثر در علوم مختلف تبدیل شده و مخاطبان آن نه تنها صاحبان شرکت‌‌ها و سیاست‌‌مدارن، بلکه کاربران هستند. در این میان این حوزه در مطالعات شهری هم نفوذ کرده و به‌‌دلیل روش‌‌مندی آن؛ چه در قالب پژوهش‌‌هایی که صرفاً تحلیل احساس را هدف خود قرار داده‌‌اند و چه به‌‌صورت لایه‌‌ای تلفیقی در پژوهش‌‌ها مورد استفاده برنامه‌‌ریزان و طراحان شهری قرار گرفته است. مقاله‌‌ی پیش‌‌رو با هدف تبیین این حوزه در تحلیل احساسات شهری در قالب روش‌‌های مدل‌‌گرا بر آن است تا با بررسی اهمیت احساس و روش‌‌های مطرحِ بررسی آن در شهر، جایگاه این حوزه را در مطالعات شهری نشان دهد و در ادامه به آموزش ماشین برای ارائه‌‌ی مدل پیش‌‌بینی‌‌کننده برای تحلیل احساسات شهر بپردازد. مجموعه‌‌ی داده‌‌های این پژوهش مربوط به 8 کلان‌‌شهر ایران است که از توئیتر استخراج شده و تحلیل داده‌‌های متنی مورد توجه قرار گرفته است. به‌‌منظور آموزش ماشین برای تحلیل احساسات از یادگیری ماشین و یادگیری عمیق بهره برده شده و نتایج آنها با هم مقایسه شده است. الگوریتم‌‌های مورد استفاده در یادگیری ماشین، ماشین بردار پشتیبان، رگرسیون لجستیک و درخت تصمیم بوده و در یادگیری عمیق، ماشین با استفاده از شبکه‌‌ی عصبی و شبکه‌‌ی هیبریدی آموزش و تست شده است. براساس نتایج یادگیری عمیق برای پیش‌‌بینی احساسات و قطبیت متن در کلان‌‌شهرهای ایران بهتر عمل کرده و دقتی برابر با 80 داشته است.

چکیده تصویری

ارائه‌ی مدل پیش‌بینی کننده تحلیل احساسات کاربران از شهر مبتنی بر شبکه‌ی اجتماعی توئیتر؛ نمونه مطالعاتی: کلان‌شهرهای ایران

تازه های تحقیق

- در این مقاله، با استفاده از شبکه‌های اجتماعی، منبع جدید و روش مبتنی بر آن برای تحلیل احساسات شهری ارائه شده و به‌جای روش‌های سنتی،‌ از روش مدل‌گرا و فرآیند مبتنی بر آن استفاده شده است.
- این روش به‌دلیل ماهیت پیش‌بینی‌پذیر آن و قابلیت بهره‌مندی از داده‌های کلان، امکان ممیزی با هزینه‌ی کمتر و با سرعت بیشتر را فراهم می‌آورد.
- با توجه به مجموعه‌ی داده‌های جمع‌آوری شده، این پژوهش به تهیه‌ی مجموعه داده فارسی مربوط به شهر که تحلیل احساسات را نشانه می‌رود، دست یافته است.

کلیدواژه‌ها

موضوعات

عنوان مقاله [English]

A predictive model for analyzing users’ perception of the cities based on the Twitter; Case studies: Iran metropolitans

نویسنده [English]

  • Maryam Mohammadi

Associate Professor, Urban Design Department, Faculty of Urban Planning & Architecture, University of Art, Tehran, Iran/ Visiting Scholar, Statistics and Actuarial Science Department, Faculty of Mathematics, University of Waterloo, Waterloo, Canada.

چکیده [English]

Extended Abstract
Background and Objectives: The examination of users’ emotions through social media has developed into an impactful domain across diverse scientific fields, appealing not only to business proprietors and politicians but also to general users. In the meantime, this field has infiltrated urban studies and has been used by urban planners and designers due to its methodology; whether in the form of research that aims solely at emotion analysis or as an integrated layer within broader research endeavors. The aim of this article is to explain this field in the analysis of urban emotions as modeling methods in order to identify the position of this field in urban studies by examining the importance of emotion and the methods of its study in the city.
Methods: This research used the supervised machine learning approach and analyzed the sentiments of tweets related to eight major cities in Iran. The data collection consists of 930 tweets that were collected in a period of 10 years from 2011 to 2022. Initially, over 5000 tweets were collected, and during the tagging process, 80% of them were excluded due to their limited relevance to the city, emphasizing tweets related to urban space. The name of cities and tourist areas were searched to establish a balance between positive and negative data. The tweets are downloaded through Twitter streaming API and the metadata along with the text, including the number of retweets, number of likes and tweet ID, language and location. The data sets have been used for machine training after standard and normalization steps. In this research, the ratio of training data to testing data is 80 to 20. According to the supervised approach, the data were labeled by the researcher with three negative, neutral, and positive labels, and where the researcher had doubts, the opinions of two other experts were used. In general, both machine learning and deep learning have been used. In order to check the validity of the model and to test it, the confusion matrix has been used.
Findings: Firstly, the machine was trained based on 3 algorithms that were used in many research related to text sentiment analysis. Based on the test results presented on the confusion matrix, the accuracy of the trained machine in determining the polarity of the text in three polarities was defined. Among the three used algorithms, support vector machine and random forest have performed better than other algorithms. Given that the model’s highest accuracy was approximately 70%, deep learning was employed to train the machine in order to assess the potential for achieving improved results. In the following, machine learning with a convolutional neural network algorithm and a hybrid algorithm were considered. At first, the machine was trained using a convolutional neural network. The results of the accuracy of the model showed that the model is predictable by up to 75%. Next, an attempt was made to improve the predictive accuracy of the model by writing a hybrid algorithm based on the convolutional neural network. The architecture of this network is such that two types of data are considered as input to the neural network, text data and other features in the data set, including location, number of retweets, number of likes, city codes and searched content (as metadata). Therefore, based on this input and output (classification based on the polarity of the text by the researcher), the machine was trained and finally tested. As depicted in the structure of the hybrid algorithm, the significance of the text is assigned a weight of 90%, while the importance of metadata is weighted 10%. It should be noted that different percentages were given to the importance of each of the inputs and the predictability accuracy of the model was checked. As the model test results show, the designed algorithm has improved the predictability of the machine by 4%.
Conclusion: In this article, sentiment analysis based on model-oriented methods - machine learning and deep learning - was scrutinized, and therefore, while comparing it with traditional methods and lexical methods, the process of urban sentiment analysis was developed and the different levels of the process were described in detail. As stated, these methods have many advantages and can be useful for analyzing the current situation or predicting different urban projects. Besides, compared to traditional methods, they are less expensive, faster and have sufficient accuracy. According to the appropriate capability of the trained machine, this machine can predict the polarity of the data. This means that by using the text data published in social networks, it is possible to analyze the feelings of users. Certainly, when these data are geodatabases, there is also the capability to geolocate emotions. This approach allows for a swift, accurate, and cost-effective general assessment of city spaces. By identifying areas where users perceive negative emotions, the reasons can be investigated and addressed accordingly. This research has been innovative in two aspects, 1) preparing a collection of data related to the sentiment of Persian language users related to the city and 2) analyzing urban sentiment in the country using machine learning in the field of urban planning and design. Some limitations of this research include limited access to all data published on Twitter using Twitter streaming API; the small amount of available and relevant data; low use of Twitter by users due to filtering; and the unavailability of financial resources to prepare and use a larger set of data.

کلیدواژه‌ها [English]

  • Emotion Analysis
  • Machine Learning
  • Deep Learning
  • Twitter
  • Social Network
  1. Ayodele, T. (2010). Types of Machine Learning Algorithms, University of Portsmouth, United Kingdom, 21-48.
  2. Bonasoli de Oliveira, W. et al. (2020). OutdooeSent: Setiment analysis of urban outdoor images by using semantic and deep features. ACM transactiona on information systems, 1(1), 1-29.
  3. Breiman, L. (2001). Random Forests, Berkeley, University of California, 1-33.
  4. Chen, T. & Guestrin, C. (2016). Xgboost: A scalable tree boosting system, 22nd acm sigkdd international conference on knowledge discovery and data mining, America, 857-794.
  5. Devika, M. D., Sunitha, C. and Ganesh, A. (2016). Sentiment analysis: a comparative study on different approaches. Procedia Computer Science, Vol 87.
  6. EURISY, 2017 (https://goodcitylife.org/)
  7. Fathullah, A., & S.Willis, K. (2018). Engaging the Senses: The Potential of Emotional Data for Participation in Urban Planning. Urban Science, 1-21. doi:10.3390/urbansci2040098
  8. Fooladi, S., Farsi, H., Mohamadzadeh, S. (2019). Detection and classification of skin cancer using deep learning. Journal of Birjand University Medical Science, 26 (1), 44-53
  9. Gehl, J. (2010). Cities for People. (Translated by Ali Ghafari & Leila Ghafari). Tehran: Elm-e Memar Publication. [In Persian]
  10. Grandini, M. Bagli, E. Visani, G. (2020). Metrics for Multi-Class Classification, An Overview, Universita degli Studi di Bologna, Italy, 1-17.
  11. Grutter, J. K.  (1987). A sthetik der Architektur: Grundlagen der Architektur-Wahrnehmung, (Trans. Jahanshah Pakzad & Abdolreza Homayoon). [In Persian]
  12. Hastie, T. Rosset, S. Zou, H. Zhu, J. (2009). Multi-Class Adaboost. Statistics and its Interface, VOL .2, 349-360.
  13. Hogertz, C. (2010). Emotions of the urban pedestrian: sensory mapping. Pedestrians' Quality Needs, 31-52.
  14. Hollander, J. B. & Renski, H. (2015). Measuring urban attitudes using Twitter: an exploratory study. Lincoln Institute of Land Policy.
  15. Houtkamp, J. M. (2012). Affective appraisal of virtual environments. Leiden University.
  16. Huang, H., Gartner, G., Klettner, S., & Schmidt, M. (2014). Considering affective responses towards environments for enhancing location based services. The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, 93-96. doi:10.5194/isprsarchives-XL-4-93-2014
  17. Hurwitz, J. Kirsch, D. (2018). Machine Learning For Dummies, IBM Limited Edition, New Jersey.
  18. Hutto, C.J., Gilbert, E. (2014). VADER: A Parsimonious Rule-Based Model for Sentiment Analysis of Social Media Text. In Proceedings of the Eighth International AAAI Conference on Weblogs and Social Media, May 2014. Available online: https://www.aaai.org/ocs/index.php/ICWSM/ICWSM14/paper/view/8109  (accessed on 6 August 2019)
  19. Jahid, Z., Nasiri, J. (2016). Sentiment analysis using sentiment measurement. The third International Conference on Information Technology. Computer Engineering and Telecommunications. September. [In Persian]
  20. Ji et al., (2015). Cross-Modality Sentiment Analysis for Social Multimedia. IEEE International Conference on Multimedia Big Data
  21. Kaplan, A.M. & Haenlein, M. (2010). Users of theWorld, Unite! The challenges and opportunities of social media. Business Horizons, 53(1), 59–68. http://dx.doi.org/10.1016/j.bushor.2009.09.003
  22. Keith, d (2019). A Brief History of Machine learning, Dataversity site, https://medium.com/geekculture/decision-tree-random-forest-explained-with-project-c2c8ef1597ee.
  23. Kim, E. et al. (2018). Urban emotion: The interrogation of social media and its implication within urban context. The cognitive city, 2, 475-482.
  24. Kitchin, R. (2014). The real-time city? Big data and smart urbanism. GeoJournal, 79, 1–14.
  25. Lin, Y.; Geertman, S. (2019). Can Social Media Play a Role in Urban Planning? A Literature Review. In (Eds. Geertman, S., Zhan, Q., Allan, A., Pettit, C.) Computational Urban Planning and Management for Smart Cities; Springer International Publishing: Cham, Switzerland, 69–84.
  26. Liu, B., (2015). Sentiment Analysis: Mining Opinions, Sentiments, and Emotions. s.l.: Cambridge University Press.
  27. Malhotra, V. & Semwal, M. (2019). Comparison of 3 Supervised Machine Learning Models, Thesis of  Phd, University of Windsor .
  28. Mousavi S M, Ebadi H, Kiani A. (2019). Provide an Optimal Deep-network Method for Spectral-spatial Classifying of High Resolution Images. Journal of Geomatics Science and Technology, 9 (2), 151-170.
    URL: http://jgst.issgeac.ir/article-1-814-fa.html. [In Persian]
  29. Osborne, T., & Jones, P. (2017). Biosensing and geography: a mixed methods approach. Applied Geography, 1-19.
  30. Pakzad, J. (2006). Theoretical foundations and process of urban design. Tehran: Shahidi Publication. [In Persian]
  31. Poria, Soujanya. Et al. (2017). Ensemble application of convolutional neural networks and multiple kernel learning for multimodal sentiment analysis. Neurocomputing, 261, 217-230.
  32. Pourmostafa Roshan Sharemi, J., Abbasi Sarabestani, P., Mirroshandel, S. A. (2017). Presenting a sentiment analysis system in Persian using deep learning models. Journal of Language and Linguistics, 1-15. [In Persian]
  33. Pykett, J., Chrisinger, B. W., Kyriakou, K., Osborne, T., Resch, B., Stathi, A., & Whittaker, A. C. (2020). Urban Emotion Sensing Beyond ‘Affective Capture’: Advancing Critical Interdisciplinary Methods. International Journal of Environmental Research and Public Health, 1-22. doi:10.3390/ijerph17239003
  34. Rad, R., Musavi, M., & Vardi, F. (2021). Plant Disease Detection by Image Processing of Their Leaves Based on Deep-Learning. Agriultural Mechanization and Systems Research. 76(76), 49-68. [In Persian]
  35. Rastgoo, R. & Kiani, K. (2019). Face recognition using fine-tuning of Deep Convolutional Neural Network and transfer learning. Journal of Modeling in Engineering, 17(58), 103-111. [In Persian]
  36. Resch, B. et al. (2014). Urban emotions-Geo-semantic emotion extraction from technical sensors, human sensors and crowd sourced data. In G. Gartner  & H. Huang  (Eds.), Progress in location-based service 2014, Springer.
  37. Roberts, H. et al. (2018). Investigating the emotional responses of individuals to urban green space using Twitter data: a critical comparison of tree different methods of sentiment analysis. Urban Planning, 3 (1), 21-33.
  38. Saeidi, M. et al. (2016). SentiHood: Targeted aspect based sentiment analysis dataset for urban neighbourhoods. https://arxiv.org/abs/1610.03771
  39. Safavian, R. & Landgrebe, D. (1991). A Survey Of Decision Tree Classifier Methodology, Reprinted From IEEE Transactions On Systems, Man, and Cybernetics, Vol. 21, No. 3, 660-674.
  40. Sdoukopoulos, A. et al. (2018). Use of social media for assessing sustainable urban mobility indicators. International Journal of sustainable development and planning, 13(2), 338-348.
  41. Setiawan, Esther Irawati et al. (2021). Multiview sentiment analysis with Image-Text-Concept features of Indonesian social media posts. International Journal of Intelligent Engineering & Systems, 14(2), 521-535.
  42. Shah Talebi, N., Karegar, M. J., Mirzaei, K. (2015). Examining opinion polling models and analyzing user sentiments in the web environment. The second International Web Research Conference, May 8-9. [In Persian]
  43. Sim, J. et al. (2020). Tweeting the high line life: a social media lens on urban green spaces. Sustainablity, 12, 1-18. SUN397.tar.gz
  44. Yousofi Moteghaed, M.,  Sabohi, H. (2018). A review of sentiment analysis of social networks in the field of polarity. International Web Research Conference, May 3- 5, Tehran, Iran. [In Persian]
  45. Zhai, C.; Massung, S. (2016). Text. Data Management and Analysis: A Practical Introduction to Information Retrieval and Text. Mining; Morgan & Claypool: Williston, ND, USA.
  46. Zhang, Y., Jin, R., Zhou, Z.H. (2010). Understanding bag-of-words model: A statistical framework. Int. J. Mach. Learn. Cyber. 1, 43–52.