Adaptive Nearest Neighbor Classification Using Support Vector Machines