rename_metrics.RdRename metric names for generalised precision etc. The output will be renamed if:
graded_relevance == TRUEprefixed with "g-" to indicate that metrics are computed with graded relevance.
propensity_scored == TRUEprefixed with "ps-" to indicate that metrics are computed with propensity scores.
!is.null(k)suffixed with "@k" to indicate that metrics are limited to top k predictions.
rename_metrics(
res_df,
k = NULL,
propensity_scored = FALSE,
graded_relevance = FALSE
)A data.frame with a column "metric" containing metric
names "f1", "prec", "rec", "rprec".
An integer limit on the number of predictions per document to
consider. Requires a column "score" in input predicted.
Logical, whether to use propensity scores as weights.
A logical indicator for graded relevance. Defaults to
FALSE for binary relevance. If set to TRUE, the
predicted data.frame should contain a numeric column
"relevance" with values in the range of \([0, 1]\).
The input data.frame res_df with renamed metrics for
generalised precision etc.