coco_pipe.decoding.rank_average#

coco_pipe.decoding.rank_average(scores)#

Average percentile ranks per unit over score sets with partial overlap.

Each score set is ranked on its own, so sets with different calibrations weigh the same. A unit’s score is the mean of its ranks over the sets that scored it.

Parameters:

scores (mapping of str to pandas.Series) – Named scores, each indexed by unit ID (one value per unit). Missing values mean the unit was not scored by that set.

Returns:

ranks – Indexed by unit ID, with the mean rank in (0, 1] (score) and the number of sets that scored the unit (n_fits).

Return type:

pandas.DataFrame

Raises:

ValueError – If scores is empty or a score set repeats a unit.