From Dirichlet Process mixture models to spectral clustering