recall_score: Recall Score

Description Usage Arguments Value Examples

View source: R/recall_score.R

Description

Recall Score

Usage

1
recall_score(correct, predictions, pos_class = 1, neg_class = 0)

Arguments

correct

True/correct labels.

predictions

Predicted labels.

pos_class

Positive class label. Like the y value in glm, this must be between 0 and 1. default=1.

neg_class

Negative class label. Like the y value in glm, this must be between 0 and 1. default=0.

Value

recall (numeric): The recall (true positives / true positives + false negatives) of the predictions

Examples

1
2
3
cancer_model <- glm(malignant ~ texture_mean, data=cancer_clean, family="quasibinomial")
cancer_preds <- glm_predict(cancer_model, "malignant")
recall <- recall_score(cancer_clean[["malignant"]], cancer_preds[[".prediction"]])

janetxinli/glmPredict documentation built on Jan. 1, 2021, 4:28 a.m.