It computes and displays the dendrogram tree of hierarchical clustering matrix.
dendrogram(Z)
dendrogram(Z,varargin)
[T] = dendrogram(Z)
[T] = dendrogram(Z,varargin)
[T,perm] = dendrogram(Z)
[T,perm] = dendrogram(Z,varargin)
A three coloumn matrix representing a hierarchical binary tree.
It may represent one or more parameters. It may only be a positive integer specifying the number of nodes desired to be displayed in the binary tree or it may be parameters and values combination to display the binary tree in different orientation or colors.
It is vector to represent the number of leaf nodes in the generated binary tree.
It is a row vector to represent the leaf nodes in the order they appear in the dendrogram.
It displays or plots a dendrogram for a given matrix representing a binary tree. It takes one, two, three or four parameters gives out zero, one or two outputs. The first argument must be a three column-matrix representing a binary tree usually generated from a linkage function. The second argument is variable input argument varargin, whose possible values are described below. If varargin is specified as p, where p is positive integer less than or equal to the number of rows of the first argument, then only p number of leaf nodes are displayed in the dendrogram with root at the top. If varargin is specified as 'orientation', 't', which is default orientation of the dendrogram, then full dendrogram with root at the top is displayed. Other possible values of orientation are 'b','l','r' to display dendrogram with root at bottom, left and right directions. If varargin is specified as p,'orientation', 'r', it displays dendrogram of only p nodes with root on the right. If varargin is specified as 'colorthreshold',q, where q is real number between 0 and max value of third column of Z, it displays the clusters of the dendrogram below the value q in different colors. Instead of q, 'default' may be used as value of 'colorthreshold' parameter, in which case 70% of the maximum value of Z is taken as threhold value. If no output is given, it only draws dendrogram for the given inputs. If only the single output is given, it gives the number of leaf nodes used in the dendrogram. A second output may be given to return the order of the nodes appear in the dendrogram.
// dendrogram(y,5, 'orientation','r'); [p,term]=dendrogram(y,'colorthreshold','default'); Add here scilab instructions and comments | ![]() | ![]() |