iaf.cluster¶
Clustering functions.
- iaf.cluster.cluster_by_distance(X: ndarray, threshold: float = 50.0) ndarray[source]¶
Cluster positions by max distance between single points.
- Parameters:
X (np.ndarray) – List of point coordinates: n x d, where n is the number of points and d is the number of dimensions.
threshold (float) – Distance threshold for clustering.
- Returns:
labels (np.ndarray) – List of n cluster labels correspoding to the n coordinates.
n_components (int) – Number of clusters.