The importance of learning distance functions is gradually being acknowledged by the machine learning community, and different techniques are suggested that can successfully learn a strong distance function in many various contexts. Nevertheless the studies in the area are still rather fragmentary; they lack systematic analysis and focus on a limited circle of application domains. In this paper, two techniques for learning discriminative distance function are evaluated and compared on biomedical data of different kind; learning from equivalence constraints and the intrinsic Random Forest similarity. Both techniques demonstrate competitive results with respect to plain learning; the Random Forest similarity exhibits a more robust behaviour and is shown to be less susceptible to missing data and noise.