precisionRecall: Precision and Recall

Description Usage Arguments Value Examples

Description

Estimates Precision and Recall for sampling in different intersections

Usage

1
2
3
4
5
6
7
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

1
2
3
4
5
6
7
8
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)

tosca documentation built on Oct. 28, 2021, 5:07 p.m.