MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / centroid_pairwise_dist

Function centroid_pairwise_dist

machine_learning/k_means_clust.py:79–80  ·  view source on GitHub ↗
(x, centroids)

Source from the content-addressed store, hash-verified

77
78
79def centroid_pairwise_dist(x, centroids):
80 return pairwise_distances(x, centroids, metric="euclidean")
81
82
83def assign_clusters(data, centroids):

Callers 1

assign_clustersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected