Background: Machine Learning (ML) methods are being increasingly used for automating different activities, e.g., Test Case Prioritization (TCP), of Continuous Integration (CI). However, ML models need frequent retraining as a result of changes in the CI environment, more commonly known as data drift. Also, continuously retraining ML models consume a lot of time and effort. Hence, there is an urgent need of identifying and evaluating suitable approaches that can help in reducing the retraining efforts and time for ML models used for TCP in CI environments. Aims: This study aims to investigate the performance of using data drift detection techniques for automatically detecting the retraining points for ML models for TCP in CI environments without requiring detailed knowledge of the software projects. Method: We employed the Hellinger distance to identify changes in both the values and distribution of input data and leveraged these changes as retraining points for the ML model. We evaluated the efficacy of this method on multiple datasets and compared the APFDc and NAPFD evaluation metrics against models that were regularly retrained, with careful consideration of the statistical methods. Results: Our experimental evaluation of the Hellinger distance-based method demonstrated its efficacy and efficiency in detecting retraining points and reducing the associated costs. However, the performance of this method may vary depending on the dataset. Conclusions: Our findings suggest that data drift detection methods can assist in identifying retraining points for ML models in CI environments, while significantly reducing the required retraining time. These methods can be helpful for practitioners who lack specialized knowledge of software projects, enabling them to maintain ML model accuracy.
翻译:背景:机器学习方法正越来越多地被用于自动化持续集成中的不同活动(例如测试用例优先级排序)。然而,由于持续集成环境的变化(通常称为数据漂移),机器学习模型需要频繁重新训练。同时,持续重新训练机器学习模型会消耗大量时间和精力。因此,迫切需要识别和评估能够减少持续集成环境中用于测试用例优先级排序的机器学习模型重新训练工作量与时间的适用方法。目的:本研究旨在探究使用数据漂移检测技术在无需掌握软件项目详细知识的情况下,自动检测持续集成环境中用于测试用例优先级排序的机器学习模型重新训练点的性能。方法:我们采用海林格距离来识别输入数据值和分布的变化,并将这些变化作为机器学习模型的重新训练点。我们在多个数据集上评估了该方法的有效性,并仔细考虑了统计方法,将APFDc和NAPFD评估指标与定期重新训练的模型进行了比较。结果:我们对基于海林格距离的方法进行的实验评估证明了其在检测重新训练点和降低相关成本方面的效能和效率。然而,该方法的性能可能因数据集而异。结论:我们的研究结果表明,数据漂移检测方法可以帮助识别持续集成环境中机器学习模型的重新训练点,同时显著减少所需的重新训练时间。这些方法对于缺乏软件项目专业知识的实践者尤其有用,使他们能够维持机器学习模型的准确性。