clean the dir, add the k-Nearest Neighbor algorithm