  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.
