kmeans_cluster: kmeans_cluster

Description Usage Arguments Value Examples

View source: R/kmeans_cluster.R

Description

kmeans_cluster

Usage

1
2
3
4
5
6
7
8
9
kmeans_cluster(
  data,
  centers,
  nstart = 50,
  iter.max = 200,
  seed = 1234,
  algorithm = c("Hartigan-Wong", "Lloyd", "Forgy", "MacQueen"),
  trace = FALSE
)

Arguments

data

The observed or imputed matirx, with each column being the uppertriangular of a single cell HiC matrix.

centers

Either the number of clusters, say k, or a set of initial (distinct) cluster centres. If a number, a random set of (distinct) rows in x is chosen as the initial centres.

nstart

If centers is a number, how many random sets should be chosen?

iter.max

The maximum number of iterations allowed.

seed

Random seed.

algorithm

Character: may be abbreviated. Note that "Lloyd" and "Forgy" are alternative names for one algorithm.

trace

Logical or integer number, currently only used in the default method ("Hartigan-Wong"): if positive (or true), tracing information on the progress of the algorithm is produced. Higher values may produce more tracing information.

Value

Kmeans clustering results.

Examples

1
2
3
data("GSE117874_chr1_wo_diag")
data("GSE117874_imp")
cluster=kmeans_cluster(GSE117874_chr1_wo_diag, centers=2, nstart=1, iter.max=1000, seed=1)

Queen0044/scHiCBayes documentation built on Dec. 18, 2021, 8:43 a.m.