For application to new data, we need to construct the appropriate spectral fit $\rho ^$ 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 $\rho $, the spectral components from the unmixing algorithm; $\rho r$, the set of training spectral fits as a function of wavelength and training sample number; the SVM arrays from the training, $\alpha $, $Yr$, $b$; and $\rho M$, the set of reflectance templates as a function of wavelength and class. The outputs from the algorithm are the decision function images $f$ for each sub-block and class, and fitted spectra $\rho ^$ as functions of wavelength, sub-block indices, and class. Section 6 will show the application of this classifier to chemicals on different surfaces.