gap {SAGx}R Documentation

GAP statistic clustering figure of merit

Description

Calculates a goodness of clustering measure based on the average dispersion compared to a reference distribution.

Usage

gap(data = swiss,class = g, B = 500)

Arguments

data The data matrix, with samples (observations) in rows and genes (variables)in columns
class a vector descibing the cluster memberships of the rows of data
B the number of bootstrap samples

Value

The GAP statistic

Author(s)

Per Broberg

References

Tishirani, R., Walther, G. and Hastie, T. (2000) Estimating the number of clusters in a dataset via the Gap statistic. Technical Report Stanford

Examples

library("MASS")
data(swiss)
cl <- myclus(data = swiss, k = 3)
gap(swiss,cl$cluster)

[Package SAGx version 1.7.1 Index]