k*-Nearest Neighbors: From Global to Local