Clustering With Side Information: From a Probabilistic Model to a Deterministic Algorithm