naginterfaces.library.mv.cluster_hier_dendrogram¶
- naginterfaces.library.mv.cluster_hier_dendrogram(orient, dord, dmin, dstep, nsym)[source]¶
cluster_hier_dendrogram
produces a dendrogram from the results ofcluster_hier()
.For full information please refer to the NAG Library document for g03eh
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/g03/g03ehf.html
- Parameters
- orientstr, length 1
Indicates which orientation the dendrogram is to take.
The end points of the dendrogram are to the north.
The end points of the dendrogram are to the south.
The end points of the dendrogram are to the east.
The end points of the dendrogram are to the west.
- dordfloat, array-like, shape
The array as output by
cluster_hier()
. contains the distances, in dendrogram order, at which clustering takes place.- dminfloat
The clustering distance at which the dendrogram begins.
- dstepfloat
The distance represented by one symbol of the dendrogram.
- nsymint
The number of character positions used in the dendrogram. Hence the clustering distance at which the dendrogram terminates is given by .
- Returns
- cstr, ndarray, shape
The elements of contain consecutive lines of the dendrogram.
- Raises
- NagValueError
- (errno )
On entry, the number of characters that can be stored in each element of is insufficient for the requested orientation.
- (errno )
On entry, .
Constraint: , , or .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, , .
- Notes
In the NAG Library the traditional C interface for this routine uses a different algorithmic base. Please contact NAG if you have any questions about compatibility.
Hierarchical cluster analysis, as performed by
cluster_hier()
, can be represented by a tree that shows at which distance the clusters merge. Such a tree is known as a dendrogram. See Everitt (1974) and Krzanowski (1990) for examples of dendrograms. A simple example is,[figure omitted]
The end points of the dendrogram represent the objects that have been clustered. They should be in a suitable order as given by
cluster_hier()
. Object is always the first object. In the example above the height represents the distance at which the clusters merge.The dendrogram is produced in a character array using the ordering and distances provided by
cluster_hier()
. Suitable characters are used to represent parts of the tree.There are four possible orientations for the dendrogram. The example above has the end points at the bottom of the diagram which will be referred to as south. If the dendrogram was the other way around with the end points at the top of the diagram then the orientation would be north. If the end points are at the left-hand or right-hand side of the diagram the orientation is west or east. Different symbols are used for east/west and north/south orientations.
- References
Everitt, B S, 1974, Cluster Analysis, Heinemann
Krzanowski, W J, 1990, Principles of Multivariate Analysis, Oxford University Press