Extracts and summarizes coefficients across all models in an ensemble. For LASSO models, reports selection frequency. For GLM models, reports significance frequency (proportion of models where p < 0.05) and mean -log10(p-value). Both model types include coefficient statistics.
summarize_PI_coefficients(models, model_type = "auto")List of model objects, or output from load_PI_models().
Character. "auto" (detect), "LASSO", or "GLM".
List with components:
Data frame with per-feature statistics. Columns differ by model type: LASSO has n_selected, pct_selected, mean_coef_nonzero; GLM has n_significant, pct_significant, mean_neg_log10_pval. Both have mean_coef, sd_coef, median_coef.
Matrix (n_models x n_features) of coefficients
Matrix (n_models x n_features) of p-values (GLM only, NULL for LASSO)
Detected or specified model type
Number of models summarized
Raw coefficient magnitudes are not directly comparable across features with different scales (e.g., CADD ~0-50 vs LINSIGHT 0-1). For cross-feature importance comparisons, use the scale-invariant metrics:
LASSO: pct_selected (selection frequency)
GLM: pct_significant (significance frequency, p < 0.05)
Coefficient statistics (mean_coef, sd_coef, median_coef) are included for understanding effect direction and within-feature variability.
if (FALSE) { # \dontrun{
models <- load_PI_models("path/to/piModels/")
coef_summary <- summarize_PI_coefficients(models)
print(coef_summary$summary)
} # }