hklust: Hierarchical clustering

Description Usage Arguments Value Examples

View source: R/unsupervised.R

Description

Hierarchical clustering

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
hklust(
  data,
  comb = "mean",
  kernel,
  H = NULL,
  domain = NULL,
  method = "ward.D2",
  plot = TRUE,
  labels = NULL,
  title = NULL,
  cut = NULL,
  height = NULL,
  colors = "black"
)

Arguments

data

Input data

comb

If data is a list or array: how to combine them ("mean","statis","full","sparse" or a vector of coefficients)

kernel

"lin" or rbf" to standard Linear and RBF kernels. "clin" for compositional linear and "crbf" for Aitchison-RBF kernels. "jac" for quantitative Jaccard / Ruzicka kernel. "jsk" for Jensen-Shannon Kernel. "flin" and "frbf" for functional linear and functional RBF kernels. "matrix" if a pre-computed kernel matrix is given as input. With an array or a list of length *m*: Vector of *m* kernels to apply to each dataset.

H

Kernel gamma hyperparameter if needed (only RBF-like kernels)

domain

Only used in "frbf" or "flin".

method

the agglomeration method to be used: "ward.D", "ward.D2" (Ward's (1963) clustering criterion), "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC).

plot

TRUE to return the plot, FALSE to return the dendogram object

labels

A vector of labels for the leaves of the tree. Row names of the input data are used by default. If set to FALSE, no labels at all are plotted.

title

Plot title

cut

an integer scalar or vector with the desired number of groups

height

numeric scalar or vector with heights where the tree should be cut

colors

border color(s) for the rectangles.

Value

An object of class hclust with or without a plot of the cluster dendogram

Examples

1
2
3
4
## Simple case
hklust(soil$abund,kernel="clin", title = "Soil data cluster dendogram",labels=TRUE)
## Spatial data fusion case
hklust(data=smoker$abund,kernel=rep("clin",4),title="Nose samples",cut=2,colors=c("black","red"))

Yuliaxis/kernInt documentation built on Feb. 20, 2022, 12:38 a.m.