Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
79
def
centroid_pairwise_dist(x, centroids):
80
return
pairwise_distances(x, centroids, metric=
"euclidean"
)
81
82
83
def
assign_clusters(data, centroids):
Callers
1
assign_clusters
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected