Box Filter and KNN Algorithm