A wrapper for use within bootstrap computation of pr auc which covers the repeated application of:

  1. join with resampled doc_ids

  2. summarise_intermediate_results

  3. postprocessing of curve data

  4. auc computation

boot_worker_fn(
  sampled_id_list,
  intermed_res,
  propensity_scored,
  replace_zero_division_with
)

Arguments

sampled_id_list

A list of all doc_ids of the examples drawn in each bootstrap iteration.

intermed_res

Intermediate results as produced by compute_intermediate_results, with a column "searchspace_id" as grouping variable.

propensity_scored

Logical, whether to use propensity scores as weights.

replace_zero_division_with

In macro averaged results (doc-avg, subj-avg), it may occur that some instances have no predictions or no gold standard. In these cases, calculating precision and recall may lead to division by zero. CASIMiR standardly removes these missing values from macro averages, leading to a smaller support (count of instances that were averaged). Other implementations of macro averaged precision and recall default to 0 in these cases. This option allows to control the default. Set any value between 0 and 1. (Defaults to NULL, overwritable using option 'casimir.replace_zero_division_with' or environment variable 'R_CASIMIR_REPLACE_ZERO_DIVISION_WITH')

Value

A data.frame with a column "pr_auc" and optional grouping_vars.