clusterValidate
Cluster validation
Contents
Syntax
- bestClusterNum=clusterValidate(data)
- bestClusterNum=clusterValidate(data, maxClusterNum)
- bestClusterNum=clusterValidate(data, maxClusterNum, opt)
- [bestClusterNum, distortion]=clusterValidate(...)
Description
clusterValidate(data, maxClusterNum, opt) returns the best number of clusters based on cluster validation.
- data: Data for clustering, with each column being an entry
- maxClusterNum: Maximum no. of clusters
- opt: options for the function
- opt.trialNum: no. of trials for each k-means clustering
- opt.plot: 1 for plotting the result
- bestClusterNum: the returned best number of clusters
- distortion: distortion for each k-means from cluster number from 2 to maxClusterNum.
Example
DS=dcData(6); maxClusterNum=8; opt.trialNum=10; opt.plot=1; bestClusterNum=clusterValidate(DS.input, maxClusterNum, opt);
