Input: input query where
dataset where ,
Output: class score information where
(1) for
(2) for
(3)
(4) for ,
(5) =  for
(6)return
Algorithm 2: PPkNN.