In order to evaluate the spectrum prediction accuracy, it is necessary to compare the spectrum with the known spectrum in the library. In general, comparisons are made using a carefully chosen index , that estimates the degree of similarity between spectra. A weighted cosine similarity is often in use in mass spectrometry software and has the following equation .