View source: R/plot_overlap_heatmaps.R
plot_overlap_heatmaps | R Documentation |
This function takes a list of matrices of overlap and similarity coefficients and generates heatmaps to visualize them.
plot_overlap_heatmaps(coefficients, save_plot = FALSE, filename = NULL)
coefficients |
A list of matrices showing the Overlap, Jaccard, and Soerensen-Dice coefficients for the feature lists. |
save_plot |
A logical value indicating whether to save the heatmap plots to a file or not. Default is FALSE. |
filename |
A character string specifying the filename for the saved heatmap plots (if save_plot = TRUE). |
A grid of ggplot2 heatmap objects visualizing the Overlap, Jaccard, and Soerensen-Dice coefficients.
The grid layout includes heatmaps for both 'inbuilt' and 'permutation' feature importance coefficients (if available).
If save_plot
is TRUE, the heatmaps are also saved to the specified file.
# Assuming `coefficients` is a list containing matrices for Overlap, Jaccard,
# and Soerensen-Dice coefficients
# For demonstration, let's create a mock coefficients list
mock_matrix <- matrix(runif(25), nrow = 5)
coefficients <- list(inbuilt_feature_importance_coefficient = list(overlap = mock_matrix,
jaccard = mock_matrix, soerensen = mock_matrix),
permutation_importance_coefficients = list(overlap = mock_matrix,
jaccard = mock_matrix, soerensen = mock_matrix))
# Plot the overlap heatmaps
heatmap_plots <- plot_overlap_heatmaps(coefficients)
print(heatmap_plots)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.