This function ranks methods based on a set of performance metrics, using one of three user-selected normalization strategies: rank averaging, min-max scaling, or Z-scoring.

rank_methods_by_performance(
  df,
  id_col,
  weights_df,
  method = "rank",
  head_value = 20
)

Arguments

df

A data frame containing performance results (rows = methods, columns = metrics).

id_col

A single character string naming the unique identifier column in df.

weights_df

A data frame with columns:

  • metric_name: column name in df

  • display_name: pretty name for output table

  • weight: non-negative numeric weight

  • direction: "low" (lower is better) or "high" (higher is better)

method

The normalization method: "rank" (default), "minmax", or "zscore".

head_value

Optional number of top entries to show (default 20).

Value

A list with:

ranked_df

A tibble with scores and ranks.

gt_table

A gt table for presentation.