Table 3.
Procedure find_Scores (trainData) | |
---|---|
Input: Labeled data, trainData; | |
Output: S scores for iSuccess and dSuccess, S_iSuccess and S_dSuccess; | |
| |
1 | for n ← 1 to size(trainData) |
2 | minD ← Nearest_Neighbor_Distance_D (trainData(n), trainData); |
3 | minI ← Nearest_Neighbor_Distance_I (trainData(n), trainData); |
4 | if (trainData(n).label == Nearest_Neighbor_D ().label && |
5 | trainData(n).label != Nearest_Neighbor_I ().label ) |
6 | S_dSuccess.add (minD / minI); |
7 | end if |
8 | if (trainData(n).label != Nearest_Neighbor_D ().label && |
9 | trainData(n).label == Nearest_Neighbor_I ().label ) |
10 | S_iSuccess.add (minD / minI); |
11 | end if |
12 | end for |