A spectral algorithm for learning mixture models