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
nis the number of methods,rank 1is 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 ofscores. IfNone, falls back toHIGHER_IS_BETTER; missing keys default toTrue.
- Returns:
pd.DataFrame – Same shape as input, values in
[0, 1]; per-column NaN for ties.- Return type:
DataFrame