consensus_labels: One label per item from several coders

View source: R/annotation.R

consensus_labelsR Documentation

One label per item from several coders

Description

Combines the coders' answers to one question into one value per item: the most common answer, or the mean or median of Likert answers. Use it as the truth for evaluate_emotions.

Usage

consensus_labels(
  annotations,
  question = "emotion",
  method = c("majority", "mean", "median"),
  min_coders = 1
)

Arguments

annotations

The result of read_annotations.

question

The question to combine. Default is "emotion".

method

"majority" (the most common answer), "mean" or "median".

min_coders

Items with fewer answers than this get NA.

Value

A data frame with one row per item: item_id, label (the combined answer, NA for a tie or too few answers), n_coders, agreement (the share of coders who gave the majority answer; NA for the mean or median), tie, and the item's face (source, frame, frame_index, time, face, track_id, person_id), or, for a task made from items, its id, reference, prediction and scores: compare the coders with the reference by evaluate_emotions(consensus, truth_col = "reference", pred_col = "label").

See Also

annotation_agreement


transforEmotion documentation built on Oct. 26, 2026, 5:07 p.m.