Non-Functional Requirements Classification Using Machine Learning Algorithms

Full Text (PDF, 509KB), PP.56-69

Views: 0 Downloads: 0


Abdur Rahman 1,* Abu Nayem 2 Saeed Siddik 3

1. Centre for Advanced Research in Sciences (CARS), University of Dhaka, Bangladesh

2. Department of Computer Science & Engineering, Stamford University Bangladesh

3. Institute of Information Technology, University of Dhaka, Bangladesh

* Corresponding author.


Received: 24 Dec. 2022 / Revised: 11 Mar. 2023 / Accepted: 3 Apr. 2023 / Published: 8 Jun. 2023

Index Terms

Software Requirements, Non-Functional Requirements, Vectorization, Classification, Machine Learning


Non-functional requirements define the quality attribute of a software application, which are necessary to identify in the early stage of software development life cycle. Researchers proposed automatic software Non-functional requirement classification using several Machine Learning (ML) algorithms with a combination of various vectorization techniques. However, using the best combination in Non-functional requirement classification still needs to be clarified. In this paper, we examined whether different combinations of feature extraction techniques and ML algorithms varied in the non-functional requirements classification performance. We also reported the best approach for classifying Non-functional requirements. We conducted the comparative analysis on a publicly available PROMISE_exp dataset containing labelled functional and Non-functional requirements. Initially, we normalized the textual requirements from the dataset; then extracted features through Bag of Words (BoW), Term Frequency and Inverse Document Frequency (TF-IDF), Hashing and Chi-Squared vectorization methods. Finally, we executed the 15 most popular ML algorithms to classify the requirements. The novelty of this work is the empirical analysis to find out the best combination of ML classifier with appropriate vectorization technique, which helps developers to detect Non-functional requirements early and take precise steps. We found that the linear support vector classifier and TF-IDF combination outperform any combinations with an F1-score of 81.5%.

Cite This Paper

Abdur Rahman, Abu Nayem, Saeed Siddik, "Non-Functional Requirements Classification Using Machine Learning Algorithms", International Journal of Intelligent Systems and Applications(IJISA), Vol.15, No.3, pp.56-69, 2023. DOI:10.5815/ijisa.2023.03.05


[1]Hussain I, Kosseim L, Ormandjieva O. Using linguistic knowledge to classify non-functional requirements in SRS documents. In International Conference on Application of Natural Language to Information Systems 2008 Jun 24 (pp. 287-298). Springer, Berlin, Heidelberg.
[2]Tabassum MR, Siddik MS, Shoyaib M, Khaled SM. Determining interdependency among non-functional requirements to reduce conflict. In2014 International Conference on Informatics, Electronics & Vision (ICIEV) 2014 May 23 (pp. 1-6). IEEE.
[3]Kurtanović Z, Maalej W. Automatically classifying functional and non-functional requirements using supervised machine learning. In 2017 IEEE 25th International Requirements Engineering Conference (RE) 2017 Sep 4 (pp. 490-495). IEEE.
[4]Doerr J, Kerkow D, Koenig T, Olsson T, Suzuki T. Non-functional requirements in industry-three case studies adopting an experience-based NFR method. In13th IEEE International Conference on Requirements Engineering (RE'05) 2005 Aug 29 (pp. 373-382). IEEE.
[5]Rahman MA, Haque MA, Tawhid MN, Siddik MS. Classifying non-functional requirements using RNN variants for quality software development. InProceedings of the 3rd ACM SIGSOFT International Workshop on Machine Learning Techniques for Software Quality Evaluation 2019 Aug 27 (pp. 25-30).
[6]Kumar L, Baldwa S, Jambavalikar SM, Murthy LB, Krishna A. Software functional and non-function requirement classification using word-embedding. InAdvanced Information Networking and Applications: Proceedings of the 36th International Conference on Advanced Information Networking and Applications (AINA-2022), Volume 2 2022 Mar 31 (pp. 167-179). Cham: Springer International Publishing.
[7]Cleland-Huang J, Settimi R, Zou X, Solc P. The detection and classification of non-functional requirements with application to early aspects. In14th IEEE International Requirements Engineering Conference (RE'06) 2006 Sep 11 (pp. 39-48). IEEE.
[8]Cleland-Huang J, Settimi R, Zou X, Solc P. Automated classification of non-functional requirements. Requirements engineering. 2007 Apr;12(2):103-20.
[9]Slankas J, Williams L. Automated extraction of non-functional requirements in available documentation. In 2013 1st International workshop on natural language analysis in software engineering (NaturaLiSE) 2013 May 25 (pp. 9-16). IEEE.
[10]Casamayor A, Godoy D, Campo M. Identification of non-functional requirements in textual specifications: A semi-supervised learning approach. Information and Software Technology. 2010 Apr 1;52(4):436-45.
[11]Mahmoud A, Williams G. Detecting, classifying, and tracing non-functional software requirements. Requirements Engineering. 2016 Sep;21(3):357-81.
[12]Lu M, Liang P. Automatic classification of non-functional requirements from augmented app user reviews. In Proceedings of the 21st International Conference on Evaluation and Assessment in Software Engineering 2017 Jun 15 (pp. 344-353).
[13]Amasaki S, Leelaprute P. The effects of vectorization methods on non-functional requirements classification. In 2018 44th Euromicro Conference on Software Engineering and Advanced Applications (SEAA) 2018 Aug 29 (pp. 175-182). IEEE.
[14]Li LF, Jin-An NC, Kasirun ZM, Chua YP. An Empirical comparison of machine learning algorithms for classification of software requirements. International Journal of Advanced Computer Science and Applications. 2019;10(11).
[15]Dias Canedo E, Cordeiro Mendes B. Software requirements classification using machine learning algorithms. Entropy. 2020 Sep 21;22(9):1057.
[16]Abad ZS, Karras O, Ghazi P, Glinz M, Ruhe G, Schneider K. What works better? a study of classifying requirements. In 2017 IEEE 25th International Requirements Engineering Conference (RE) 2017 Sep 4 (pp. 496-501). IEEE.
[17]Lima M, Valle V, Costa E, Lira F, Gadelha B. Software engineering repositories: expanding the promise database. In Proceedings of the XXXIII Brazilian Symposium on Software Engineering 2019 Sep 23 (pp. 427-436).
[18]Haque MA, Rahman MA, Siddik MS. Non-functional requirements classification with feature extraction and machine learning: An empirical study. In2019 1st International Conference on Advances in Science, Engineering and Robotics Technology (ICASERT) 2019 May 3 (pp. 1-5). IEEE.
[19]Sharma VS, Ramnani RR, Sengupta S. A framework for identifying and analyzing non-functional requirements from text. In Proceedings of the 4th international workshop on twin peaks of requirements and architecture 2014 Jun 1 (pp. 1-8).
[20]Sarkar D. Text analytics with python. New York, NY, USA: Apress; 2016.
[21]Bengfort B, Bilbro R, Ojeda T. Applied text analysis with python: Enabling language-aware data products with machine learning. " O'Reilly Media, Inc."; 2018 Jun 11.
[22]Forman G. An extensive empirical study of feature selection metrics for text classification. J. Mach. Learn. Res. 2003 Mar 3;3(Mar):1289-305.
[23]Cox DR. Two further applications of a model for binary regression. Biometrika. 1958 Dec 1;45(3/4):562-5.
[24]He J, Ding L, Jiang L, Ma L. Kernel ridge regression classification. In2014 International Joint Conference on Neural Networks (IJCNN) 2014 Jul 6 (pp. 2263-2267). IEEE.
[25]Crammer K, Dekel O, Keshet J, Shalev-Shwartz S, Singer Y. Online passive aggressive algorithms.
[26]Zhang T. Solving large scale linear prediction problems using stochastic gradient descent algorithms. In Proceedings of the twenty-first international conference on Machine learning 2004 Jul 4 (p. 116).
[27]Domingos P, Pazzani M. On the optimality of the simple Bayesian classifier under zero-one loss. Machine learning. 1997 Nov;29(2):103-30.
[28]Cortes C, Vapnik V. Support-vector networks. Machine learning. 1995 Sep;20(3):273-97.
[29]Kotsiantis SB, Zaharakis I, Pintelas P. Supervised machine learning: A review of classification techniques. Emerging artificial intelligence applications in computer engineering. 2007 Jun 10;160(1):3-24.
[30]Apté C, Damerau F, Weiss SM. Automated learning of decision rules for text categorization. ACM Transactions on Information Systems (TOIS). 1994 Jul 1;12(3):233-51.
[31]Breiman L. Random forests. Machine learning. 2001 Oct;45(1):5-32.
[32]Quinlan JR. Bagging, boosting, and C4. 5. InAaai/Iaai, vol. 1 1996 Aug 4 (pp. 725-730).
[33]Friedman JH. Greedy function approximation: a gradient boosting machine. Annals of statistics. 2001 Oct 1:1189-232.
[34]Freund Y, Schapire R, Abe N. A short introduction to boosting. Journal-Japanese Society for Artificial Intelligence. 1999 Sep 1;14(771-780):1612.
[35]Iqbal T, Elahidoost P, Lucio L. A bird's eye view on requirements engineering and machine learning. In2018 25th Asia-Pacific Software Engineering Conference (APSEC) 2018 Dec 4 (pp. 11-20). IEEE.