Helper function which performs the major bootstrap operation and wraps the repeated application of summarise_intermediate_results and compute_pr_auc_from_curve for each bootstrap run.

generate_pr_auc_replica(
  intermed_res_all_thrsld,
  seed,
  n_bt,
  propensity_scored,
  replace_zero_division_with = options::opt("replace_zero_division_with"),
  progress = options::opt("progress")
)

Arguments

intermed_res_all_thrsld

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

seed

Pass a seed to make bootstrap replication reproducible.

n_bt

An integer number of resamples to be used for bootstrapping.

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')

progress

Display progress bars for iterated computations (like bootstrap CI or pr curves). (Defaults to FALSE, overwritable using option 'casimir.progress' or environment variable 'R_CASIMIR_PROGRESS')

Value

A data.frame with columns "boot_replicate", "pr_auc".