Learn R Programming

casimir (version 0.3.3)

summarise_intermediate_results_dplyr: Compute the mean of intermediate results

Description

Compute the mean of intermediate results created by compute_intermediate_results. Variant with dplyr based internals rather than collapse internals.

Usage

summarise_intermediate_results_dplyr(
  intermediate_results,
  propensity_scored = FALSE,
  label_distribution = NULL
)

Value

A data.frame with columns "metric", "value".

Arguments

intermediate_results

As produced by compute_intermediate_results. This requires a list containing:

  • results_table A data.frame with columns "prec", "rprec", "rec", "f1".

  • grouping_var A character vector of variables to group by.

propensity_scored

Logical, whether to use propensity scores as weights.

label_distribution

Expects a data.frame with columns "label_id", "label_freq", "n_docs". label_freq corresponds to the number of occurences a label has in the gold standard. n_docs corresponds to the total number of documents in the gold standard.