Our final accuracy metric used is weighted cosine similarity (WCS) which is a common metric used by mass spectrometry software and is precisely how the creators of NEIMS, Wei et al., measured spectral similarity when training the NEIMS machine learning algorithm . WCS measures the cosine of the angle between two vectors in a multi-dimensional space where each vector represents a spectra and the dimensions correspond to intensities at each m/z value. In terms of accuracy, WCS scores greater than 0.7 are generally classified as 'similar.' 27