1. A method to determine a similarity measure between first and second patterns, the method comprising: (a) obtain first and second feature vectors, the first and second feature vectors representing the first and second patterns, respectively; and (b) computing a similarity probability of the first and second feature vectors using a piecewise linear probability density function (PDF), the similarity probability corresponding to the similarity measure.