Research Article
Local versus Global Models for Just-In-Time Software Defect Prediction
Algorithm 1
The application process of local models for JIT-SDP.
| Input: training set: test set: the number of clusters: k | | Output: prediction results: R | (1) | begin | (2) | | (3) | //Divide the training set into k clusters | (4) | clusters, cluster_centers = k-medoids (D, k) | (5) | //Train a classifier for each cluster | (6) | classifiers = modeling_algorithm (clusters) | (7) | for Instance t in T do | (8) | //Assign a cluster number i for each instance t | (9) | i = calculate_min_distance (t, cluster_centers) | (10) | r = classifiers [i].predict (t) //perform prediction | (11) | R.append (r) | (12) | end | (13) | end |
|