Persistent homology for high-dimensional data based on spectral methods