Metric Embedding for Nearest Neighbor Classification