Essential Number of Principal Components and Nearly Training-Free Model for Spectral Analysis