evaluate_performance: Evaluate Model Performance (ROC and Precision-Recall)

View source: R/evaluate_performance.R

evaluate_performanceR Documentation

Evaluate Model Performance (ROC and Precision-Recall)

Description

Evaluate Model Performance (ROC and Precision-Recall)

Usage

evaluate_performance(predicted_probs, actual_classes, positive_label)

Arguments

predicted_probs

Numeric vector of predicted probabilities for the positive class.

actual_classes

Factor or character vector of the actual true labels.

positive_label

Character string. The target class you want to evaluate.

Value

An object of class 'quickSentiment_eval', which is a list containing the following metrics:

target_class

Character. The specific positive label used for the evaluation.

auc_roc

Numeric. The Area Under the Receiver Operating Characteristic curve.

best_threshold_roc

Numeric. The optimal probability threshold that maximizes Youden's J statistic.

auc_pr

Numeric. The Area Under the Precision-Recall curve.

best_threshold_pr

Numeric. The probability threshold that maximizes the F1-Score.

accuracy_at_best

Numeric. The overall accuracy of the model if 'best_threshold_pr' is applied.

roc

S3 object containing the ROC curve data and metrics.

prc

S3 object containing the Precision-Recall curve data and metrics.

threshold_summary

A data frame summarizing Accuracy, Precision, Recall, and F1 at 0.1 threshold increments.


quickSentiment documentation built on Aug. 29, 2026, 1:07 a.m.