A shortest-path based clustering algorithm for joint human-machine analysis of complex datasets