Theoretical Analysis of the Nearest Neighbor Classifier in Noisy Domains