Learn R Programming

casimir (version 0.3.3)

find_ps_rprec_deno: Compute the denominator for R-precision

Description

Compute the denominator for R-precision based on propensity scored ranking of gold standard labels.

Usage

find_ps_rprec_deno(gold_vs_pred, grouping_var, cost_fp)

find_ps_rprec_deno_dplyr(gold_vs_pred, grouping_var, cost_fp)

Value

A data.frame with columns "n_gold", "n_suggested", "tp", "fp", "fn", "delta_relevance", "rprec_deno".

Arguments

gold_vs_pred

A data.frame with logical columns "suggested", "gold" as produced by create_comparison.

grouping_var

A character vector of grouping variables that must be present in gold_vs_pred (dplyr version requires rlang symbols).

cost_fp

A numeric value > 0, defaults to NULL.

Functions

  • find_ps_rprec_deno_dplyr(): Variant with dplyr based internals rather than collapse internals.