Input: The training set , the test instance , number of subsets . |
Output: The predicted label . |
1 Initialization: , -nearest neighbor set |
2 Divide the set into disjoint using Mini-batch -Means clustering algorithm and get cluster centers set ; |
whiledo |
3 Find the set according to the similarity between and each instance of , where 1 |
4 |
5 Update -nearest neighbor set of to generate a new set by comparing the similarity between and each instance of |
6 ; |
7 ; |
end |
8 Obtain the predicted label based on the majority class on |
9 Return. |