A new concept of higher-order similarity and the role of distance/similarity measures in local classification methods