Seol mar théacs é seo: Efficient discriminative learning of parametric nearest neighbor classifiers