Learn R Programming

clusternor (version 0.0-4)

Hmeans: Perform parallel hierarchical clustering on a data matrix.

Description

A recursive (not acutally implemented as recursion) partitioning of data into two disjoint sets at every level as described in https://en.wikipedia.org/wiki/Hierarchical_clustering

Usage

Hmeans(
  data,
  kmax,
  nrow = -1,
  ncol = -1,
  iter.max = 20,
  nthread = -1,
  init = c("forgy"),
  tolerance = 1e-06,
  dist.type = c("eucl", "cos", "sqeucl", "taxi"),
  min.clust.size = 1
)

Arguments

data

Data file name on disk (NUMA optmized) or In memory data matrix

kmax

The maximum number of centers

nrow

The number of samples in the dataset

ncol

The number of features in the dataset

iter.max

The maximum number of iteration of k-means to perform

nthread

The number of parallel threads to run

init

The type of initialization to use c("forgy") or initial centers

tolerance

The convergence tolerance for k-means at each hierarchical split

dist.type

What dissimilarity metric to use

min.clust.size

The minimum size of a cluster when it cannot be split

Value

A list of lists containing the attributes of the output. cluster: A vector of integers (from 1:k) indicating the cluster to which each point is allocated. centers: A matrix of cluster centres. size: The number of points in each cluster. iter: The number of (outer) iterations.

Examples

Run this code
# NOT RUN {
iris.mat <- as.matrix(iris[,1:4])
kmax <- length(unique(iris[, dim(iris)[2]])) # Number of unique classes
kms <- Hmeans(iris.mat, kmax)

# }

Run the code above in your browser using DataLab