Transfer learning for cross-company software defect prediction

  • Authors:
  • Ying Ma;Guangchun Luo;Xue Zeng;Aiguo Chen

  • Affiliations:
  • School of Computer Science and Engineering, University of Electronic Science and Technology of China, Chengdu 610054, China;School of Computer Science and Engineering, University of Electronic Science and Technology of China, Chengdu 610054, China;School of Computer Science and Engineering, University of Electronic Science and Technology of China, Chengdu 610054, China and Department of Computer Science, University of California, Los Angele ...;School of Computer Science and Engineering, University of Electronic Science and Technology of China, Chengdu 610054, China

  • Venue:
  • Information and Software Technology
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Context: Software defect prediction studies usually built models using within-company data, but very few focused on the prediction models trained with cross-company data. It is difficult to employ these models which are built on the within-company data in practice, because of the lack of these local data repositories. Recently, transfer learning has attracted more and more attention for building classifier in target domain using the data from related source domain. It is very useful in cases when distributions of training and test instances differ, but is it appropriate for cross-company software defect prediction? Objective: In this paper, we consider the cross-company defect prediction scenario where source and target data are drawn from different companies. In order to harness cross company data, we try to exploit the transfer learning method to build faster and highly effective prediction model. Method: Unlike the prior works selecting training data which are similar from the test data, we proposed a novel algorithm called Transfer Naive Bayes (TNB), by using the information of all the proper features in training data. Our solution estimates the distribution of the test data, and transfers cross-company data information into the weights of the training data. On these weighted data, the defect prediction model is built. Results: This article presents a theoretical analysis for the comparative methods, and shows the experiment results on the data sets from different organizations. It indicates that TNB is more accurate in terms of AUC (The area under the receiver operating characteristic curve), within less runtime than the state of the art methods. Conclusion: It is concluded that when there are too few local training data to train good classifiers, the useful knowledge from different-distribution training data on feature level may help. We are optimistic that our transfer learning method can guide optimal resource allocation strategies, which may reduce software testing cost and increase effectiveness of software testing process.