find homogeneous groups of items based on pairwise information