cut_tree_to_labels
cut_tree_to_labels(tree, max_depth, n_points, n_clusters)Cut PCA tree at n_clusters and return point labels array.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| tree | PCA tree dict from build_pca_tree(). | required | |
| max_depth | Depth used when building the tree. | required | |
| n_points | Total number of points. | required | |
| n_clusters | Desired number of clusters. | required |
Returns
| Name | Type | Description |
|---|---|---|
| np.ndarray of shape (n_points,) with cluster labels. |