Spectral Algorithms for Supervised Learning