Mass Spectrometry, Tutorial, Python, Data Analysis, Research.
pair_i_j is the same as pair_j_i, we set is_symmetric=True to speed up calculations a bit. Still, the next step means calculating about 800,000 cosine scores which might take a bit (few to a few dozens of minutes): scores = calculate_scores(spectrums, spectrums, similarity_measure,