Statistics Toolbox | ![]() ![]() |
Calculate the inconsistency coefficient of a cluster tree
Syntax
Description
computes the inconsistency coefficient for each link of the hierarchical cluster tree Y = inconsistent(Z)
Z
, where Z
is an (m-1)-by-3 matrix generated by the linkage
function. The inconsistency coefficient characterizes each link in a cluster tree by comparing its length with the average length of other links at the same level of the hierarchy. The higher the value of this coefficient, the less similar the objects connected by the link.
computes the inconsistency coefficient for each link in the hierarchical cluster tree Y = inconsistent(Z,d)
Z
to depth d
, where d
is an integer denoting the number of levels of the cluster tree that are included in the calculation. By default, d=2
.
The output, Y
, is an (m-1)-by-4 matrix formatted as follows.
For each link, k, the inconsistency coefficient is calculated as:
For leaf nodes, nodes that have no further nodes under them, the inconsistency coefficient is set to 0.
Example
rand('seed',12); X = rand(10,2); Y = pdist(X); Z = linkage(Y,'centroid'); W = inconsistent(Z,3) W = 0.0423 0 1.0000 0 0.1406 0 1.0000 0 0.1163 0.1047 2.0000 0.7071 0.2101 0 1.0000 0 0.2054 0.0886 3.0000 0.6792 0.1742 0.1762 3.0000 0.6568 0.2336 0.1317 4.0000 0.6408 0.3081 0.2109 5.0000 0.7989 0.4610 0.3728 4.0000 0.8004
See Also
cluster
, cophenet
, clusterdata
, dendrogram
, linkage
, pdist
, squareform
![]() | icdf | iqr | ![]() |