LingPy

lingpy.test.evaluate.EvalMSA.sp_score

EvalMSA.sp_score(mode=1)

Calculate the sum-of-pairs (SP) score.

Parameters :

mode : { 1, 2, 3 }

Indicate, which mode to compute. Select between:

  1. divide the number of common residue pairs in reference and test alignment by the total number of residue pairs in the test alignment (the traditional SP score described in Thompson1999, also known as “precision” score in applications of information retrieval),
  2. divide the number of common residue pairs in reference and test alignment by the total number of residue pairs in the reference alignment (also known as “recall” score in applications of information retrieval),
  3. divide the number of common residue pairs in reference and test alignment by the average number of residue pairs in reference and test alignment.
Returns :

score : float

The SP score for gold standard and test alignments.

Notes

The SP score (see Thompson1999) is calculated by dividing the number of identical residue pairs in reference and test alignment by the total number of residue pairs in the reference alignment.