This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / cluster / hierarchy / _hierarchy_impl / ClusterNode

class

scipy.cluster.hierarchy._hierarchy_impl:ClusterNode

source: build-install/usr/lib/python3.14/site-packages/scipy/cluster/hierarchy/_hierarchy_impl.py:981

Signature

class ClusterNode(id, left = None, right = None, dist = 0.0, count = 1)

Members

Summary

A tree node class for representing a cluster.

Extended Summary

Leaf nodes correspond to original observations, while non-leaf nodes correspond to non-singleton clusters.

The to_tree function converts a matrix returned by the linkage function into an easy-to-use tree representation.

All parameter names are also attributes.

Parameters

id : int

The node id.

left : ClusterNode instance, optional

The left child tree node.

right : ClusterNode instance, optional

The right child tree node.

dist : float, optional

Distance for this cluster in the linkage matrix.

count : int, optional

The number of samples in this cluster.

Notes

Array API Standard Support

ClusterNode is not in-scope for support of Python Array API Standard compatible backends other than NumPy.

See dev-arrayapi for more information.

See also

to_tree

for converting a linkage matrix Z into a tree object.

Aliases

  • scipy.cluster.hierarchy.ClusterNode