In this work, we show how to take advantage of parametric generative models for learning local metrics to improve nearest neighbor classification. In particular, we show how finite sampling introduces bias in the information-theoretic performance of a nearest neighbor classifier, and how the optimal local metric can be analytically found from a semi-definite programming problem. We demonstrate how this learned metric enhances the discriminative nearest neighbor performance on various datasets using simple Gaussian class conditional generative models.