R: Clustering Sum-of-Squares for clustering evaluation

css {GMD} | R Documentation

## Clustering Sum-of-Squares for clustering evaluation

### Description

Evaluation on the varaince of a clustering model using squared Euclidean distances, based on distance matrix and cluster membership.

### Usage

    css(dist.obj,clusters)

    ## Computing Sum-of-Squares given Hierarchical Clustering
    ## S3 method for class 'hclust'
    css(dist.obj, hclust.obj=NULL,hclust.FUN=hclust,
    hclust.FUN.MoreArgs=list(method="ward"),k=NULL)

### Arguments

`dist.obj` | a ‘dist’ object as produced by `dist` or `gdist`.
`clusters` | a vector with cluster memberships.
`k` | numeric, the upper bound of the number of clusters to compute. DEFAULT: 20 or the number of observations (if less than 20).
`hclust.obj` | a ‘hclust’ object, generated by `hclust`
`hclust.FUN` | a function, to generate a hierarchical clustering. Ignored with `hclust.obj` specified. DEFAULT: `hclust`
`hclust.FUN.MoreArgs` | a list, containing arguments that are passed to `hclust.FUN`.

### Details

Clustering Sum-of-Squares for clustering evaluation.

### Value

`css` returns a ‘css’ object, which is a list containing the following components

k | number of clusters
wss | `k` within-cluster sum-of-squares
totwss | total within-cluster sum-of-square
totbss | total between-cluster sum-of-square
tss | total sum of squares of the data

, and with an attribute ‘meta’ that contains the input components

dist.obj | (the input) distance matrix
clusters | (the input) cluster membership

`css.hclust` returns a ‘css.multi’ object, which is a data.frame containing the following columns

k | number of clusters
ev | explained variance given `k`
totbss | total between-cluster sum-of-square
tss | total sum of squares of the data

, and with an attribute ‘meta’ that contains

cmethod | the clustering method
dist.obj | (the input) distance matrix
k | (the input) number of clusters
clusters | the `hclust' object that is either by input or computed by default

### See Also

`elbow` for "elbow" plot using ‘css.multi’ object

[Package GMD version 0.3.3 Index]