sc_reconstruction.metrics.aggregate_rank_percentile#

sc_reconstruction.metrics.aggregate_rank_percentile(scores, higher_is_better=None)[source]#

Convert raw per-method, per-metric scores to rank-percentiles.

Implements the paper’s formula:

rp_i(m) = (n - rank_i(m)) / (n - 1)

where n is the number of methods, rank 1 is best, and the output range is [0, 1] — best method gets 1.0, worst gets 0.0.

Parameters:
  • scores (DataFrame) – DataFrame indexed by method (rows) and metric names (columns).

  • higher_is_better (Mapping[str, bool] | None) – Mapping {metric_name: bool} for each column of scores. If None, falls back to HIGHER_IS_BETTER; missing keys default to True.

Returns:

pd.DataFrame – Same shape as input, values in [0, 1]; per-column NaN for ties.

Return type:

DataFrame