vampire.analysis.assign_clusters_id#
- vampire.analysis.assign_clusters_id(pc, contours, centroids, n_pcs=20)[source]#
Assign the contours with id of the closest centroid.
- Parameters:
- pcndarray
Principal components of contours.
- contoursndarray
Object contours, with shape (n_contours, 2*n_points).
- centroidsndarray
Coordinates of cluster centers of K-means clusters.
- n_pcsint, optional
Number of principal components used for approximation.
- Returns:
- contours_dfDataFrame
DataFrame of objects’ contour coordinates, cluster id, and min distance from centroid.