Assignment probability heatmap (BT-SBM)
Source:R/plotting_functions.R
plot_assignment_probabilities.RdHeatmap of item-wise posterior assignment probabilities for clusters (relabeled so that Cluster 1 is the top block by decreasing \(\lambda\)). Items are ordered by their most probable cluster and marginal wins.
Usage
plot_assignment_probabilities(
fit,
w_ij = NULL,
max_n_clust = NULL,
clean_fun = clean_players_names,
k_show = NULL,
fill_low = "#FFFFCC",
fill_high = "#006400"
)Arguments
- fit
Output list from
gibbs_BT_SBM()(must includerelabeled$assign_prob).- w_ij
Optional wins matrix to compute marginal wins for ordering and annotation. If
NULL, items are ordered by most-probable cluster only.- max_n_clust
Where to filter the mcmc x_t. If not specified we use the modal K
- clean_fun
Optional function to prettify names. Default: identity.
- k_show
Optional integer number of clusters to show (defaults to all columns in
assign_prob).- fill_low, fill_high
Colors for the heatmap gradient low/high.