compute_predictive_contributions: Compute predictive contributions of feature groups

View source: R/41_refined_anchored_lasso.R

compute_predictive_contributionsR Documentation

Compute predictive contributions of feature groups

Description

Analyzes the relative contribution of grouped features to the overall discriminant signal, based on averaged Lasso coefficients across cross-validation folds.

Usage

compute_predictive_contributions(result, group, group_threshold = 5)

Arguments

result

A result object returned by mean_comparison_anchor(), containing fold_data with classifier coefficients.

group

A grouping vector indicating group membership of features. Must be the same length as the number of features.

group_threshold

Integer. Minimum number of active features required in a group for it to be considered active. Default is 5.

Details

The function identifies active groups based on cross-validated non-zero coefficients, then decomposes the total L2 norm of the average coefficient vector across groups.

Value

A data frame with two columns:

group

Group name or label.

score

Proportion of total predictive signal attributable to that group.

See Also

collect_active_features_proj


HMC documentation built on June 8, 2025, 10:32 a.m.