Visualization and Multiclass Classification of Complaints to Official Organisms on Twitter

Keywords: Text Mining, Multiclass Classification, Social Networks, Twitter


Social networks generate massive amounts of information. Current Natural Language techniques allow the automatic processing of that information, and Data Mining enables the automatic extraction of useful info. However, a state-of-the-art review reveals that many classification methods only distinguish two classes. This paper presents a procedure to automatically classify tweets into several classes (more than two). The steps of the procedure are described in detail so that any researcher can follow them. The accuracy and coverage (instead of only coverage as usual in the literature) of two automatic classifiers (SVM and Random Forests) were analyzed in a comparative study. The procedure was applied to automatically identify more than two types of complaint from 190,000 tweets. According to the results, Random Forests should be used because they achieve an average accuracy of 81.46 % and an average coverage of 59.88 %.

Author Biographies

Beatriz Hernández-Pajares, Centro de Inteligencia Artificial, Wavespace, España

MSc. en Ingeniería de Computación, Centro de Inteligencia Artificial, Wavespace, Madrid-España,

Diana Pérez-Marín*, Universidad Rey Juan Carlos, España

PhD. en Ingeniería de Computación, Departamento de Ingeniería de Sistemas, Universidad Rey Juan Carlos, Madrid-España,

Vanessa Frías-Martínez, Universidad de Maryland, Estados Unidos

PhD. en Ingeniería de Computación, Facultad de Estudios de Información y UMIACS, Universidad de Maryland, College Park-Estados Unidos,


S. Galeano, “Cuáles son las redes sociales con más usuarios del mundo (2019),” M4rketing Ecommerce, 2019. Disponible en:, [Accedido: 27-Jan-2020].

K. Smith, “44 estadísticas de Twitter,” Brandwatch, 2016. Disponible en: URL [Accedido: 27-Jan-2020].

C. D. Manning y H. Schiitze, Foundations of Statistical Natural Language Processing: Massachusetts Institute of Technology: MIT Press. Cambridge, 1999. Disponible en:

M. Vallez y R. Pedraza-Jimenez, “El Procesamiento del Lenguaje Natural en la Recuperación de Información Textual y áreas afines,”, vol. 5, 2007. Disponible en:

tf-idf, “What does tf-idf mean?”. Disponible en: [Accedido: 27-Jan-2020].

C. C. Aggarwa y C. Zhai, Mining Text Data: Boston, MA: Springer US, 2012.

Z. Malkani y E. Gillie, “Supervised Multi-Class Classification of Tweets,” pp. 1–6, Dec. 2012. Disponible en:

Twitter, “What The Trend,” 2009. Disponible en:

K. Lee, D. Palsetia, R. Narayanan, M. M. A. Patwary, A. Agrawal, y A. Choudhary, “Twitter Trending Topic Classification,” en 2011 IEEE 11th International Conference on Data Mining Workshops, Vancouver 2011. pp. 251–258.

Y. Zhu, X. Shen, y W. Pan, “Network-based support vector machine for classification of microarray samples,” BMC Bioinformatics, vol. 10, no S21, Jan. 2009.

J. Ramos, “Using tf-idf to determine word relevance in document queries,” en Proceedings of the first instructional conference on machine learning, Piscataway, 2003, pp. 133–142. Disponible en:

I. Rish, “An empirical study of the naive Bayes classifier,” en IJCAI 2001 workshop on empirical methods in artificial intelligence, 2001, pp. 41–46. Disponible en:

E. Anguiano-Hernández, Naive Bayes Multinomial para clasificación de texto usando un esquema de pesado por clases, pp.1-8, Apr. 2009. Disponible en:

N. Cristianini y J. Shawe-Taylor, An Introduction to Support Vector Machines and Other Kernel-based Learning Methods Cambridge: University Press, 2000.

RuleQuest Research “About us,” 2018. Disponible en: [Accedido: 21-Sep-2019].

B. Sriram, D. Fuhry, E. Demir, H. Ferhatosmanoglu, y M. Demirbas, “Short text classification in twitter to improve information filtering,” en Proceeding of the 33rd international ACM SIGIR conference on Research and development in information retrieval - SIGIR ’10, Geneva, 2010, pp. 841–842.

J. Nazura y B. L. Muralidhara, “Semantic classification of tweets: A contextual knowledge based approach for tweet classification,” en 2017 8th International Conference on Information, Intelligence, Systems & Applications (IISA), Larnaca, 2017, pp.1-6.

P. Selvaperumal y A. Suruliandi, “A short message classification algorithm for tweet classification,” en 2014 International Conference on Recent Trends in Information Technology, Chennai, 2014. pp. 1–3.

R. C. Balabantaray, M. Mohammad, y N. Sharma, “Multi-Class Twitter Emotion Classification: A New Approach,” Int. J. Appl. Inf. Syst., vol. 4, no. 1, pp. 48–53, Sep. 2012.

E. D’Andrea, P. Ducange, A. Bechini, A. Renda, y F. Marcelloni, “Monitoring the public opinion about the vaccination topic from tweets analysis,” Expert Syst. Appl., vol. 116, pp. 209–226, Feb. 2019.

M. Habdank, N. Rodehutskors, y R. Koch, “Relevancy assessment of tweets using supervised learning techniques: Mining emergency related tweets for automated relevancy classification,” en 2017 4th International Conference on Information and Communication Technologies for Disaster Management (ICT-DM), Münster, 2017, pp. 1–8.

J. F. Franco-Bermúdez y W. L. Ruiz-Castañeda, “Análisis de redes sociales para un sistema de innovación generado a partir de un modelo de simulación basado en agentes,” TecnoLógicas, vol. 22, no. 44, pp. 21–44, Jan. 2019.

R. S. Ghaly, E. Elabd, y M. A. Mostafa, “Tweets classification, hashtags suggestion and tweets linking in social semantic web,” en 2016 SAI Computing Conference (SAI), London, 2016. pp. 1140–1146.

E. Yar, I. Delibalta, L. Baruh, y S. S. Kozat, “Online text classification for real life tweet analysis,” en 2016 24th Signal Processing and Communication Application Conference (SIU), Zonguldak, 2016. pp. 1609–1612.

J. M. Rodriguez, D. Godoy, C. Mateos, y A. Zunino, “A multi-core computing approach for large-scale multi-label classification,” Intell. Data Anal., vol. 21, no. 2, pp. 329–352, Mar. 2017., “Overview”. Disponible en:

R. Longadge, S. Dongre y L. Malik, “Class Imbalance Problem in Data Mining Review,” Int. J. Comput. Sci. Netw., vol. 2, no. 1, pp. 83–87, May, 2013. Disponible en:

B. Hernández-Pajares, “Clasificación Automática Multiclase de Tweets y su Representación Gráfica,”(Tesis de Maestría), Facultad de ingeniería, Madrid, Universidad Rey Juan Carlos, 2013. Disponible en:

B. Hernández-Pajares, D. Pérez-Marín y V. Frías-Martínez, “TFM_code”, 2013. Disponible en:

How to Cite
Hernández-Pajares, B., Pérez-Marín, D., & Frías-Martínez, V. (2020). Visualization and Multiclass Classification of Complaints to Official Organisms on Twitter. TecnoLógicas, 23(47), 109-120.


Download data is not yet available.
Research Papers

Most read articles by the same author(s)