Building suitable similarity models presents a key issue in developing case-based classification systems. A good similarity model should reflect the real usefulness of a previous case for solving a new problem. This article proposes a new approach to learning of similarity assessments by optimizing local compatibility functions. The goal is to achieve a set of matching functions that are coherent in the sense of most supportive evidences whereas least inconsistence when applied to the case library. The effectiveness of the presented method has been demonstrated by the evaluation results on a set of data sets in the University of California-Irvine (UCI) Machine Learning Repository.