Minor changes to enable preprocessing when running KNN with uniform weights (no learning).