Categories &

Functions List

Class Definition: ClusterCriterion

statistics: ClusterCriterion

A clustering evaluation object.

The ClusterCriterion is a superclass for clustering evaluation objects, which are created by the evalclusters function. It is not meant to be instantiated directly.

See also: evalclusters, CalinskiHarabaszEvaluation, DaviesBouldinEvaluation, GapEvaluation, SilhouetteEvaluation

Source Code: ClusterCriterion

The ClusterCriterion class contains the following properties:

A character vector or a function handle specifying the clustering algorithm used to generate the clustering solutions. It can be empty if the clustering solutions are passed as an input matrix. This property is read-only.

A character vector specifying the name of the criterion used to evaluate the clustering solutions. This property is read-only.

A numeric vector containing the values generated by the evaluation criterion for each clustering solution. This property is read-only.

A numeric vector containing the list of the number of clusters evaluated. This property is read-only.

A logical vector indicating which observations in the data matrix contain missing values (NaN). This property is read-only.

An integer specifying the number of non-missing observations in the data matrix. This property is read-only.

An integer specifying the optimal number of clusters based on the evaluation criterion. This property is read-only.

A numeric vector representing the clustering solution that corresponds to the optimal number of clusters. This property is read-only.

A numeric matrix containing the data used for clustering. This property is read-only.

The ClusterCriterion class offers the following public methods:

ClusterCriterion: obj = ClusterCriterion (x, clust, KList)

ClusterCriterion is a superclass and is not meant to be instantiated directly. Use evalclusters instead.

See also: evalclusters

ClusterCriterion: obj = addK (obj, k)

addK adds a new list of cluster numbers, k, to the ClusterCriterion object.

ClusterCriterion: h = plot (obj)

plot generates a plot of the criterion values against the number of clusters.

The optimal number of clusters is marked with an asterisk.

The optional return value, h, is a graphics handle to the plot.

ClusterCriterion: obj = compact (obj)

obj = compact (obj) returns an object of the same class holding the results of the evaluation but none of the data it was computed from, which is useful when the evaluation is kept and the sample is large.

X, Missing and OptimalY are emptied; InspectedK, CriterionValues, OptimalK, NumObservations, CriterionName and ClusteringFunction are kept. The object compacted from is not changed.

A compacted object can still be displayed and plotted, and compacting one again does nothing, but addK raises: there are no observations left to cluster.