Analyses expert input weights to determine which features are most important per subgroup. For two groups, returns a signed difference plot (GroupB - GroupA). For >2 groups, performs a non-inferential analysis: per-group mean importances, pairwise (B - A) difference tables for all pairs, and a multi-group plot for the features with the largest max-min spread across groups.
analyse_experts(
gnn_results,
prepared_data,
group_mappings = NULL,
top_n_features = 10,
verbose = FALSE
)A list with:
Long table of feature importances by group & repeat
Wide table of per-feature mean importance per group
Named list of B_vs_A difference tables (descriptive)
ggplot; only when there are exactly 2 groups
ggplot; only when there are >2 groups
Long table used for the multi-group plot
A list from train_gnn().
A list from prepare_data() (used to retrieve group mappings if not provided).
Optional named mapping from group codes (names) to labels (values).
Integer; number of top features to visualise.
Logical; print progress messages.