Course_3, week-1, assignment

why I have this problem

1 Like


Can you send me the code in a direct message and I’ll take a look.

from your code above, i guess you need to put normalize distance into distance list and then find minimum distance.
something like:
for j in range(X.shape[0]):
distance =
for j in range(centroids.shape[0]):
norm_ij = np.linalg.norm[(X[i] - centroids[0])
idx[i]= np.argmin(distance)
return idx