precisionRecall: Precision and Recall

precisionR Documentation

Precision and Recall

Description

Estimates Precision and Recall for sampling in different intersections

Usage

precision(w, p, subset)

vprecision(w, p, subset, n)

recall(w, p, subset)

vrecall(w, p, subset, n)

Arguments

w

Numeric vector: Each entry represents one intersection. Proportion of texts in this intersection.

p

Numeric vector: Each entry represents one intersection. Proportion of relevant texts in this intersection.

subset

Logical vector: Each entry represents one intersection. Controls if the intersection belongs to the subcorpus of interest or not.

n

Integer vector: Number of Texts labeled in the corresponding intersection.

Value

Estimator for precision, recall, and their variances respectively.

Examples

w <- c(0.5, 0.1, 0.2, 0.2)
p <- c(0.01, 0.8, 0.75, 0.95)
subset <- c(FALSE, TRUE, FALSE, TRUE)
n <- c(40, 20, 15, 33)
precision(w, p, subset)
vprecision(w, p, subset, n)
recall(w, p, subset)
vrecall(w, p, subset, n)


Docma-TU/tosca documentation built on June 2, 2025, 3:11 a.m.