4. The method of claim 3 , wherein the computing of the affinity matrix includes: calculating the representations of the vector distances by performing an exponential transform on ratios of each of the vector distances to a median value of the vector distances.
3. The method of claim 2 , wherein the computing of the affinity matrix includes: calculating a feature vector of an image that depicts the visual pattern; calculating vector distances between the visual pattern and other visual patterns in the reference set based on the feature vector; and including representations of the vector distances in the affinity matrix as quantifiers of similarity between the visual pattern and the other visual patterns.