View source: R/evaluate_performance.R
| evaluate_performance | R Documentation |
Evaluate Model Performance (ROC and Precision-Recall)
evaluate_performance(predicted_probs, actual_classes, positive_label)
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. |
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.