For application to new data, we need to construct the appropriate spectral fit since these are our feature vectors. This requires knowledge of the correct template spectrum, which is of course unknown. We, therefore, apply the trained classifier to all material classes within an outer loop over the local sub-blocks of the input HS data. The resulting implementation algorithm is summarized in Algorithm 3. The required inputs are , the spectral components from the unmixing algorithm; , the set of training spectral fits as a function of wavelength and training sample number; the SVM arrays from the training, , , ; and , the set of reflectance templates as a function of wavelength and class. The outputs from the algorithm are the decision function images for each sub-block and class, and fitted spectra as functions of wavelength, sub-block indices, and class. Section 6 will show the application of this classifier to chemicals on different surfaces.