plot_similarity {SkeletalVis} | R Documentation |
Plot ranked cosine similarity scores with top n labels
Description
Takes a similarity table with columns for ID, cosine, and zscore values, and generates a plot showing the rank of the z-scores on a log scale. Labels for the top n IDs with the highest z-scores are displayed on the plot.
Usage
plot_similarity(similarity_table, top_n = 10)
Arguments
similarity_table |
A data frame with columns: 'ID' (identifier for each item), 'cosine' (cosine similarity score), and 'zscore' (z-score). |
top_n |
An integer indicating the number of top IDs by zscore to label in the plot. Default is 10. |
Value
A ggplot object displaying the ranked z-scores on a log scale, with labels for the top n items by zscore.
Examples
data(query)
skeletalvis <- load_skeletalvis(demo=TRUE)
similarity_results <- experiment_similarity(skeletalvis, query)
# Plot similarity table with labels for top 5 items
plot_similarity(similarity_results, top_n = 5)
[Package SkeletalVis version 0.1.1 Index]