Feature extraction from spectral and other data by the principal components and discriminant function techniques