# Basic usage with random data
set.seed(123)
bg_pred <- runif(1000) # bg predictions
test_pred <- runif(500) # Test predictions
# Compute only partial AUC metrics (500 iterations)
results <- auc_parallel(test_pred, bg_pred,
threshold = 5.0,
iterations = 100) # Reduced for example
# View first 5 iterations
head(results, 5)
# Summarize results (assume complete AUC was not computed)
summary <- summarize_auc_results(results, has_complete_auc = FALSE)
# Interpretation:
# - auc_pmodel: Model's partial AUC (higher is better)
# - auc_prand: Random model's partial AUC
# - ratio: Model AUC / Random AUC (>1 indicates better than random)
# Compute both partial and complete AUC
full_results <- auc_parallel(test_pred, bg_pred,
compute_full_auc = TRUE,
iterations = 100)
Run the code above in your browser using DataLab