View source: R/plot_inertia_from_tree.R
plot_inertia_from_tree | R Documentation |
Plot inertia, absolute loss and relative loss from a classification tree
plot_inertia_from_tree(tree, k_max = 15)
get_inertia_from_tree(tree, k_max = 15)
tree |
A dendrogram, i.e. an stats::hclust object,
an FactoMineR::HCPC object or an object that can be converted to an
stats::hclust object with |
k_max |
Maximum number of clusters to return / plot. |
A ggplot2
plot or a tibble.
hc <- hclust(dist(USArrests))
get_inertia_from_tree(hc)
plot_inertia_from_tree(hc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.