cluster_phate: KMeans on the PHATE potential Clustering on the PHATE...

Description Usage Arguments Value Examples

View source: R/cluster.R

Description

KMeans on the PHATE potential Clustering on the PHATE operator as introduced in Moon et al. This is similar to spectral clustering.

Usage

1
cluster_phate(phate, k = 8, seed = NULL)

Arguments

phate

phate() output

k

Number of clusters (default: 8)

seed

Random seed for kmeans (default: NULL)

Value

clusters Integer vector of cluster assignments

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
if (reticulate::py_module_available("phate")) {

# Load data
# data(tree.data)
# We use a smaller tree to make examples run faster
data(tree.data.small)

# Run PHATE
phate.tree <- phate(tree.data.small$data)

# Clustering
cluster_phate(phate.tree)
}

Example output

Loading required package: Matrix
Warning message:
In system2(command = python, args = shQuote(config_script), stdout = TRUE,  :
  running command ''/usr/bin/python3' '/usr/lib/R/site-library/reticulate/config/config.py' 2>/dev/null' had status 126

phateR documentation built on Feb. 12, 2021, 5:12 p.m.