Abstract In classification problems an appropriate choice of the data similarity measure is a key step to guarantee the success of discrimination procedures. In this work, we propose a general methodology to transform the available data similarity S, incorporating the data labels, to improve the performance of discrimination procedures. We will focus on the case when S is asymmetric. We study the precise connection between similarity matrices and integral operators that will allow the evaluation of the transformed matrix on test points. The proposed methodology is used in several simulated and real experiments where the performance of several discrimination techniques is improved.