Learning an Asymmetric and Anisotropic Similarity Metric for Case-Based Reasoning