On the relationship between dimensionality reduction and spectral clustering from a kernel viewpoint