Function cosineSimilarity

  • Cosine similarity between two MS spectra. This algorithm is optimized for missing mass values.

    Parameters

    • ms1x: number[]

      Array of mass values for the first spectra

    • ms1y: number[]

      Array of weighted abundance values for the first spectra

    • ms2x: number[]

      Array of mass values for the second spectra

    • ms2y: number[]

      Array of weighted abundance values for the second spectra

    Returns number

    Similarity between two MS spectra.