collect_active_features_proj: Collect active features and groups based on projection...

View source: R/41_refined_anchored_lasso.R

collect_active_features_projR Documentation

Collect active features and groups based on projection directions

Description

Identifies consistently non-zero features across cross-validation folds using a voting scheme and returns active groups if a grouping vector is provided.

Usage

collect_active_features_proj(
  test_result,
  voting_method = c("majority_voting"),
  group = NULL,
  group_threshold = 1
)

Arguments

test_result

A result object from mean_comparison_anchor() containing fold_data.

voting_method

Character. Method to determine active features. Only "majority_voting" is currently supported.

group

Optional grouping vector with feature names. Must match the feature dimension of classifier_coef.

group_threshold

Integer. Minimum number of active features required to declare a group active. Default is 1.

Value

If group is provided, returns a list with:

active_features

Character vector of consistently non-zero features.

active_groups

Character vector of active groups.

If group is NULL, returns a character vector of active features only.


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