Learn R Programming

tosca (version 0.3-4)

precision: 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)

Value

Estimator for precision, recall, and their variances respectively.

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab