plot_upset | R Documentation |
This function produces separate UpSet plots for inbuilt feature importances and permutation importances, allowing you to visualize the overlap of feature lists. Optionally, you can include custom lists.
plot_upset(pipeline_results, custom_lists = NULL)
pipeline_results |
A PipelineResults object containing the fitted pipelines, cross-validation results, selected features, mean performance, and mean feature importances. |
custom_lists |
An optional named list of character vectors. Each character vector should contain feature names. The names of the list will be used as names in the UpSet plots. |
A named list containing two UpSet plots:
@field inbuilt_importance: An UpSet plot visualizing overlaps of inbuilt feature importances.
@field permutation_importance: An UpSet plot (if permutation importance is available) visualizing overlaps of permutation importances. Each plot provides an interactive way to explore the intersections and unique elements of the feature lists.
# Mock data for PipelineResults
pipeline_results <- new("PipelineResults",
inbuilt_feature_importance = list(
Method1 = data.frame(feature = c("gene1", "gene2", "gene3")),
Method2 = data.frame(feature = c("gene2", "gene4"))),
permutation_importance = list(
Method1 = data.frame(feature = c("gene1", "gene5")),
Method2 = data.frame(feature = c("gene3", "gene6"))))
# Mock custom lists
custom_lists <- list("custom1" = c("gene1", "gene2"), "custom2" = c("gene3", "gene4"))
# Generate UpSet plots
result <- plot_upset(pipeline_results, custom_lists)
print(result$inbuilt_importance)
print(result$permutation_importance)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.