vampire.analysis.assign_clusters_id¶
- vampire.analysis.assign_clusters_id(pc, contours, centroids, num_pc=20)[source]¶
Assign the contours with id of the closest centroid.
- Parameters
- pcndarray
Principal components of contours.
- contoursndarray
Object contours, with shape (num_contour, 2*num_points).
- centroidsndarray
Coordinates of cluster centers of K-means clusters.
- num_pcint, optional
Number of principal components used for approximation.
- Returns
- contours_dfDataFrame
DataFrame of objects’ contour coordinates with cluster id.
- min_distancendarray
Distance of truncated principal components to the closest centroid.