Probability Based Metrics for Nearest Neighbor Classification and Case-Based Reasoning