Description Usage Arguments Value Author(s) See Also Examples
This function takes a data frame of instances characterized by cluster IDs, condenses the instance vectors, creates a distance matrix between each instance grouped by cluster, and visualizes the clustering using a heat map color gradient from very similar (i.e. blue; low distance) to very dissimilar (i.e. red; high distance).
1 |
df |
(REQUIRED) Data frame containing numeric features and a cluster ID column. Cluster ID column must be labelled "Cluster" and contain exclusive cluster IDs of type numeric, integer, or factor. |
order_diag |
(OPTIONAL) Boolean argument of whether or not to order the diagonal of the final heat matrix. A ordered diagonal will order the gradient of instances within each cluster, thus highlighting how much of each cluster is very similar or very different. |
merge |
(OPTIONAL) Numeric argument of how many instance vectors to condense for the heat map visualization (e.g. 10,000 rows with merge = 10 corresponds to 1,000 instances in the heat map). |
dist_metric |
(OPTIONAL) Character argument of what method to use for measuring distance between instances. Arguments are limited to those provided in the dist base-function, which include "euclidean", "maximum", "Manhattan", "Canberra", "binary" and "Malinowski". |
legend |
(OPTIONAL) Character argument of the plot legend title. |
axislabs |
(OPTIONAL) Character argument of the plot axis labels (note: one argument) |
title |
(OPTIONAL) Character argument of the plot title. |
interactive |
(OPTIONAL) Logical argument to enable plotly's ggplotly function. |
A ggplot instance-level distance matrix heat map visualization.
Derek Lukacsko & Jonathan Bourne
bigextract, summaryheat
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.