ClusterCount: ClusterCount

View source: R/ClusterCount.R

ClusterCountR Documentation

ClusterCount

Description

Calulates statistics for clustering in each group of the data points

Usage

ClusterCount(Cls,Ordered=TRUE,NonFinite=9999)

Arguments

Cls

1:n numerical vector of numbers defining the classification as the main output of the clustering algorithm for the n cases of data. It has k unique numbers representing the arbitrary labels of the clustering.

Ordered

Optional, boolean, if TRUE: the ouput is ordered increasingly by cluster labels in UniqueClusters.

NonFinite

Optional, If non finite values are given in the numerical vector, they are set to the scalar value defined here

Details

The ordering of the output is defined by the first occurence of every cluster label in Cls in the setting of Ordered=FALSE.

The function can be overloaded with non-numerical vectors. In this case, a cast via as.character() is applied to Cls, a warning is stated, and the statistics are still computed.

Value

UniqueClusters

[1:k] numerical vector of the k unique clusters in Cls

CountPerCluster

Named vector [1:k] with the number of data points in the corresponding unique clusters. Names are the UniqueClusters

NumberOfClusters

The number of clusters k

ClusterPercentages

[1:k] numerical vector of the percentages of datapoints belonging to a cluster for each cluster

Author(s)

Michael Thrun

Examples

data('Hepta')
Cls=Hepta$Cls
ClusterCount(Cls)

FCPS documentation built on Oct. 19, 2023, 5:06 p.m.