Construction of optimum variables for spectral interpretation (pattern recognition)