Visualises routing from Actual Group -> Assigned Expert (2-axis), or Actual Group -> Learned Feature Profile -> Assigned Expert (3-axis) when feature mapping is available.
plot_sankey(
prepared_data,
gnn_results,
expert_results = NULL,
top_n_per_side = 2,
use_profiles = TRUE,
verbose = FALSE
)A ggplot object.
List from prepare_data(); used for group labels and (optionally) feature mapping.
Needs feature_names for 3-axis; subject_ids to align subjects to X.
List from train_gnn(); uses $final_results and $gate_weights.
Optional list from analyse_experts(); used only for picking opposed features in 3-axis.
Integer; number of features per side to define Profile A/B (default 2) for 3-axis.
Logical; try 3-axis when possible (default TRUE). If FALSE, always do 2-axis.
Logical; print progress.