genderizeR (version 1.0.0)

classificatonErrors: Calculating classification errors and other prediction indicators

Description

classificatonErrors builds confusion matrix from manually coded and predicted gender vectors and returns different specific classification errors calculated on that matrix.

Usage

classificatonErrors(labels, predictions)

Arguments

labels
A vector of true labels. Shoud have following values: c("female", "male", "unknown", "noname"). "noname" stands also for initials only.
predictions
A vector of predicted gender. Shoud have following values: c("female", "male", NA).

Value

  • A list of gender prediction efficency indicators: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Examples

Run this code
set.seed(23)
labels = sample(c("female", "male", "unknown", "noname"), 100, replace = TRUE)
predictions = sample(c("female", "male", NA), 100, replace = TRUE)
classificatonErrors(labels, predictions)

Run the code above in your browser using DataLab