Machine Learning for Requirements Classification
摘要
In recent years, machine learning approaches have attracted a great interest in the requirements engineering (RE) community, resulting in a large number of publications. However, in spite of this, research in this area is still in the early experimental stage, involving mainly exploring different machine learning models and assessing their performance for various RE tasks. In this chapter, we present a practical guidance to new researchers and practitioners, to help them conduct machine learning experiments for RE tasks. Such a guidance is currently missing in the RE literature. Specifically, as most RE tasks can be, and, indeed, have been, framed as classification problems, our guidance will focus on machine learning for requirements classification tasks. We show how to prepare the datasets for learning, how to train different types of machine learning model—including traditional learning algorithms, deep learning models and language models—and how to evaluate the performance of the trained models. We also offer some implementation advice and draw attention to some important considerations when using machine learning for requirements classification. Finally, to show the relevance our guidance to RE, we provide a brief overview of the research in applying machine learning to requirements classification tasks. This guidance will serve as a foundation for machine learning research and practice in RE, to help RE researchers and practitioners to gain a systematic understanding of conducting machine learning experiments and to enable them to explore machine learning techniques more effectively.