
Summarize Predictor Importance and Selection Stability Across Outer Folds
Source:R/compare_censoring_weights.R
summarize_outer_importance.RdComputes selection frequency (\(\hat{\beta} \neq 0\)), median, range, and interquartile summary statistics of model coefficients across outer folds and candidate models. Accepts either the long tibble returned by [tidy_outer_coefficients()] or the nested tibble returned by [score_outer()].
Arguments
- x
A tibble returned by [tidy_outer_coefficients()] (with `term` and `estimate` columns) or [score_outer()] (with a `coefficients` list column).
- nonzero_only
Logical (default `FALSE`). When `TRUE`, `median_estimate`, `min_estimate`, `max_estimate`, and quantiles are computed over non-zero estimates only (with `0` when never selected). When `FALSE`, they are computed across all evaluated models/folds.
- label_map
Optional label mapping (named character vector, data frame with `term`/`short`/`full`, or `cbe_label_map` object). Defaults to the active package label map from [cbe_labels()].
- style
Label style to use when applying `label_map`: `"short"` or `"full"`.
Value
A tibble with one row per predictor and columns `term`, `label`, `n_models`, `n_selected`, `selection_freq`, `median_estimate`, `mean_estimate`, `min_estimate`, `max_estimate`, `range_estimate`, `q25_estimate`, `q75_estimate`, and `iqr_estimate`, ordered by descending `selection_freq` and `abs(median_estimate)`.