compute_changes: Describe changes in the record labels after a...

View source: R/Analysis.R

compute_changesR Documentation

Describe changes in the record labels after a Classification/Review Iteration

Description

Takes an Annotation file with a Rev_prediction_new column and computes differences in the labelling introduced by the last automatic classification / review.

Usage

compute_changes(Annotations)

Arguments

Annotations

An Annotation data set, as data frame or as a file path to it.

Value

A data frame with total reviewed positive and negative labels and their sum, the new labels added in the Rev_prediction_new column, and and summary of all changes in the last iteration, e.g.: n -> y (a previously non relevant record becoming relevant) or unlab. -> n (an unlabeled record becoming negative).

Examples

## Not run: 

# Taking the path to an annotation data file; also the actual data frame can
# be passed
Annotations <- get_session_files("Session1")$Annotations[2]

out <- compute_changes(Annotations)

# The output is easier to read if changed in a long format:
str(out) # the easiest solution for fast inspection of results

# To get a long format data frame
tidyr::pivot_longer(out, everything(),
  names_to = "Indicator", values_to = "Value"
)

## End(Not run)

bakaburg1/BaySREn documentation built on March 30, 2022, 12:16 a.m.