Nearest neighbor sampling for better defect prediction

  • Authors:
  • Gary D. Boetticher

  • Affiliations:
  • University of Houston - Clear Lake, Houston, Texas

  • Venue:
  • PROMISE '05 Proceedings of the 2005 workshop on Predictor models in software engineering
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

An important step in building effective predictive models applies one or more sampling techniques. Traditional sampling techniques include random, stratified, systemic, and clustered. The problem with these techniques is that they focus on the class attribute, rather than the non-class attributes. For example, if a test instance's nearest neighbor is from the opposite class of the training set, then it seems doomed to misclassification. To illustrate this problem, this paper conducts 20 experiments on five different NASA defect datasets (CM1, JM1, KC1, KC2, PC1) using two different learners (J48 and Naïve Bayes). Each data set is divided into 3 groups, a training set, and "nice/nasty" neighbor test sets. Using a nearest neighbor approach, "Nice neighbors" consist of those test instances closest to class training instances. "Nasty neighbors" are closest to opposite class training instances. The "Nice" experiments average 94 percent accuracy and the "Nasty" experiments average 20 percent accuracy. Based on these results a new nearest neighbor sampling technique is proposed.