clust_membership: Get cluster membership for each observation of an umapscan...

Description Usage Arguments See Also Examples

View source: R/clustering.R

Description

The clusters taken into account are all the "leaves" of the object clusters tree. If a parent is specified, only the leaves of its subtree are taken.

Usage

1
2
3
4
5
6
7
clust_membership(
  us,
  parent = "",
  max_level,
  noise_inherit_parent = FALSE,
  labels = TRUE
)

Arguments

us

umapscan object to describe clusters

parent

name of the parent cluster

max_level

get membership at most this level deep

noise_inherit_parent

if TRUE, 'Noise' points are given their parent cluster membership

labels

if TRUE, use label when possible instead of identifier as cluster names

See Also

clust_compute(), clust_get_data(), 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_membership(us)
us <- clust_compute(us, minPts = 3, eps = 0.45, parent = "3")
clust_membership(us)
clust_membership(us, parent = "3")

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