@@ -127,7 +127,7 @@ def ward_tree(X, connectivity=None, n_components=None, n_clusters=None,
127
127
128
128
Returns
129
129
-------
130
- children : 2D array, shape (n_nodes, 2)
130
+ children : 2D array, shape (n_nodes-1 , 2)
131
131
The children of each non-leaf node. Values less than `n_samples`
132
132
correspond to leaves of the tree which are the original samples.
133
133
A node `i` greater than or equal to `n_samples` is a non-leaf
@@ -145,7 +145,7 @@ def ward_tree(X, connectivity=None, n_components=None, n_clusters=None,
145
145
The parent of each node. Only returned when a connectivity matrix
146
146
is specified, elsewhere 'None' is returned.
147
147
148
- distances : 1D array, shape (n_nodes, )
148
+ distances : 1D array, shape (n_nodes-1 , )
149
149
Only returned if return_distance is set to True (for compatibility).
150
150
The distances between the centers of the nodes. `distances[i]`
151
151
corresponds to a weighted euclidean distance between
@@ -346,7 +346,7 @@ def linkage_tree(X, connectivity=None, n_components=None,
346
346
347
347
Returns
348
348
-------
349
- children : 2D array, shape (n_nodes, 2)
349
+ children : 2D array, shape (n_nodes-1 , 2)
350
350
The children of each non-leaf node. Values less than `n_samples`
351
351
correspond to leaves of the tree which are the original samples.
352
352
A node `i` greater than or equal to `n_samples` is a non-leaf
@@ -364,7 +364,7 @@ def linkage_tree(X, connectivity=None, n_components=None,
364
364
The parent of each node. Only returned when a connectivity matrix
365
365
is specified, elsewhere 'None' is returned.
366
366
367
- distances : ndarray, shape (n_nodes,)
367
+ distances : ndarray, shape (n_nodes-1 ,)
368
368
Returned when return_distance is set to True.
369
369
370
370
distances[i] refers to the distance between children[i][0] and
@@ -659,7 +659,7 @@ class AgglomerativeClustering(BaseEstimator, ClusterMixin):
659
659
n_components_ : int
660
660
The estimated number of connected components in the graph.
661
661
662
- children_ : array-like, shape (n_nodes, 2)
662
+ children_ : array-like, shape (n_nodes-1 , 2)
663
663
The children of each non-leaf node. Values less than `n_samples`
664
664
correspond to leaves of the tree which are the original samples.
665
665
A node `i` greater than or equal to `n_samples` is a non-leaf
@@ -822,7 +822,7 @@ class FeatureAgglomeration(AgglomerativeClustering, AgglomerationTransform):
822
822
n_components_ : int
823
823
The estimated number of connected components in the graph.
824
824
825
- children_ : array-like, shape (n_nodes, 2)
825
+ children_ : array-like, shape (n_nodes-1 , 2)
826
826
The children of each non-leaf node. Values less than `n_features`
827
827
correspond to leaves of the tree which are the original samples.
828
828
A node `i` greater than or equal to `n_features` is a non-leaf
@@ -902,7 +902,7 @@ class Ward(AgglomerativeClustering):
902
902
n_components_ : int
903
903
The estimated number of connected components in the graph.
904
904
905
- children_ : array-like, shape (n_nodes, 2)
905
+ children_ : array-like, shape (n_nodes-1 , 2)
906
906
The children of each non-leaf node. Values less than `n_samples`
907
907
refer to leaves of the tree. A greater value `i` indicates a node with
908
908
children `children_[i - n_samples]`.
@@ -970,7 +970,7 @@ class WardAgglomeration(AgglomerationTransform, Ward):
970
970
971
971
Attributes
972
972
----------
973
- children_ : array-like, shape (n_nodes, 2)
973
+ children_ : array-like, shape (n_nodes-1 , 2)
974
974
The children of each non-leaf node. Values less than `n_features`
975
975
correspond to leaves of the tree which are the original samples.
976
976
A node `i` greater than or equal to `n_features` is a non-leaf
0 commit comments