Patent ID: 8452716

Claim:
A method of determining the similarity of a first spectrum and a second spectrum, each spectrum representing a result of spectral analysis of a material or chemical, each spectrum comprising a set of m spectral attributes distributed across a spectral range, the method comprising calculating a kernel function which comprises: (a) calculating the similarity of the two spectra at an i th one of the spectral attributes; (b) repeating the step of calculating for each of the set of m spectral attributes; (c) deriving a combined value indicative of the similarity of the two spectra wherein deriving the combined value includes adding the results of the m calculations, wherein calculating the similarity of the two spectra at the i th one of the spectral attributes comprises: determining a first difference between a value of the i th spectral attribute in the first spectrum and each of a set of neighboring spectral attributes within a first window around the i th spectral attribute in the first spectrum; determining a second difference between a value of the i th spectral attribute in the second spectrum and each of a set of neighboring spectral attributes within a second window around the i th spectral attribute in the second spectrum, wherein the first and second windows are the same size.