Evaluates the discriminative performance of PI models using AUC (Area Under the ROC Curve). Computes per-model AUC and ensemble AUC on case/control data.

evaluate_PI_models(
  models,
  cases,
  controls,
  model_type = "auto",
  features = NULL,
  max_controls = NULL,
  n_eval_controls = NULL,
  random_seed = NULL
)

Arguments

models

List of model objects, or output from load_PI_models().

cases

Matrix, data.frame, or file path to case (positive) annotations.

controls

Matrix, data.frame, file path, or directory for control (negative) annotations. If a directory, loads all chr*.csv files.

model_type

Character. "auto" (detect), "LASSO", or "GLM".

features

Character vector. Feature columns to use. NULL uses default 11 PI features.

max_controls

Integer. Maximum controls to load from directory (memory limit). Uses proportional sampling per chromosome. NULL loads all.

n_eval_controls

Integer. Number of controls to use in evaluation after loading. NULL uses all loaded controls.

random_seed

Integer. For reproducible control sampling.

Value

List with components:

per_model

Data frame with model_id and auc columns

ensemble

List with auc and predictions

summary

List with mean_auc, sd_auc, min_auc, max_auc

roc_data

List with labels, per-model predictions, ensemble predictions

metadata

Evaluation settings and data info

Examples

if (FALSE) { # \dontrun{
models <- load_PI_models("path/to/piModels/")
eval_result <- evaluate_PI_models(
  models,
  cases = "cases_annotated.csv",
  controls = "controls_dir/",
  max_controls = 10000
)
cat("Ensemble AUC:", eval_result$ensemble$auc, "\n")
} # }