Stav dette: Efficient discriminative learning of parametric nearest neighbor classifiers