clust_describe: Describe clusters of an umapscan object

Description Usage Arguments Details See Also Examples

View source: R/clustering_plots.R

Description

Describe clusters of an umapscan object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
clust_describe(
  us,
  parent = "",
  labels = TRUE,
  type = c("boxplot", "ridges", "barplot", "keyness"),
  position = "fill",
  keyness_measure = c("chi2", "lr", "exact", "pmi"),
  n_terms = 20,
  text_size = 10,
  free_scale = TRUE,
  show_negative = TRUE
)

Arguments

us

umapscan object to describe clusters

parent

name of the parent cluster

labels

if TRUE, use cluster label instead of id if available

type

plot type, either "boxplot", "ridges", "barplot" or "keyness"

position

if type = "barplot", position argument to add to geom_bar

keyness_measure

if type = "keyness", passed as measure argument to quanteda::textstat_keyness

n_terms

if type = "keyness", number of terms to show

text_size

if type = "keyness", plot text size

free_scale

if type = "keyness", don't use the same scale on each barplot

show_negative

if TRUE and type = "keyness", show negative keyness features

Details

"boxplot" and "ridges" are suitable for continuous variables, "barplot" is better for binary categorical ones. "keyness" is suitable when the original data is a document-feature matrix.

See Also

clust_compute(), clust_get_data(), clust_membership(), clust_rename()

Examples

1
2
3
4
5
6
7
8
library(dplyr)
iris_num <- iris %>% select_if(is.numeric)
us <- new_umapscan(iris_num, n_neighbors = 25, min_dist = 0.1, seed = 1337)
us <- clust_compute(us, minPts = 3, eps = 0.5)
clust_describe(us)
us <- clust_compute(us, minPts = 3, eps = 0.45, parent = "3")
clust_describe(us, type = "ridge")
clust_describe(us, parent = "3")

juba/umapscan documentation built on Aug. 29, 2020, 7:31 a.m.