1. An apparatus for comparing objects, the apparatus comprising: a distance measure component configured to compute a path-based distance D ij path between an object i and an object j in an undirected graph (O,E) where O is a set of N objects including the object i and the object j and E is a set of edges connecting pairs of objects in the undirected graph with each edge having an edge weight, the distance measure component comprising an electronic data processing device programmed to compute the path-based distance D ij path by operations including (i) computing a minimum spanning tree over the undirected graph and (ii) computing a path-based distance between the object i and the object j in the minimum spanning tree and (iii) setting the path-based distance D ij path between the object i and the object j in the undirected graph equal to the path-based distance between the object i and the object j in the minimum spanning tree.